/* ========================================
   Product Details Page Styles
   ======================================== */

.product-details-section {
    padding: 60px 20px;
    background: #ffffff;
    min-height: 100vh;
}

.product-details-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 40px;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.breadcrumb-nav a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-nav a:hover {
    color: #c41e3a;
}

.breadcrumb-nav i {
    color: #ddd;
    font-size: 0.75rem;
}

.breadcrumb-nav span {
    color: #1a1a1a;
    font-weight: 600;
}

/* Product Details Wrapper */
.product-details-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
    align-items: start;
}

/* Product Images Section */
.product-images-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-image-main {
    position: relative;
    width: 100%;
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-image-main:hover .main-image {
    transform: scale(1.05);
}

/* Wishlist Button on Image */
.btn-wishlist-image {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #ccc;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-wishlist-image:hover {
    background: #f5f5f5;
    color: #c41e3a;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.2);
}

.btn-wishlist-image.active {
    background: #c41e3a;
    color: white;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

/* Product Thumbnails */
.product-image-thumbnails {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #c41e3a;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.2);
}

/* Product Info Section */
.product-info-section {
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    line-height: 1.3;
}

/* Price Section */
.product-price-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #c41e3a;
}

/* Description */
.product-description {
    margin-bottom: 30px;
    line-height: 1.7;
    color: #666;
}

.product-description p {
    margin: 0;
}

/* Add to Cart Section */
.add-to-cart-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.95rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    line-height: 1.5;
    color: #1a1a1a;
    background-color: white;
    background-clip: padding-box;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    color: #1a1a1a;
    background-color: white;
    border-color: #c41e3a;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(196, 30, 58, 0.25);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #f5f5f5;
    opacity: 1;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: fit-content;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.qty-btn:hover {
    background: #f5f5f5;
    color: #c41e3a;
}

#quantity {
    width: 60px;
    height: 40px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-weight: 600;
    color: #1a1a1a;
    background: white;
}

#quantity:focus {
    outline: none;
}

/* Add to Cart Buttons */
.btn-add-to-cart-main,
.btn-buy-now {
    width: 100%;
    padding: 14px 20px;
    margin-bottom: 12px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-to-cart-main {
    background: #c41e3a;
    color: white;
}

.btn-add-to-cart-main:hover {
    background: #a01729;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.btn-add-to-cart-main:active {
    transform: translateY(0);
}

.btn-buy-now {
    background: #1a1a1a;
    color: white;
    border: 2px solid #1a1a1a;
}

.btn-buy-now:hover {
    background: white;
    color: #1a1a1a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Product Features */
.product-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    border-radius: 6px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.feature:hover {
    background: #f0f0f0;
}

.feature i {
    font-size: 1.8rem;
    color: #c41e3a;
    margin-bottom: 8px;
}

.feature span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* Product Meta */
.product-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.meta-value {
    color: #1a1a1a;
    font-weight: 500;
}

.meta-value.in-stock {
    color: #27ae60;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Product Tabs Section */
.product-tabs-section {
    margin-top: 60px;
    border-top: 2px solid #e0e0e0;
    padding-top: 40px;
}

.tabs-header {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: wrap;
}

.tab-button {
    padding: 12px 20px;
    border: none;
    background: none;
    color: #666;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-button:hover {
    color: #c41e3a;
}

.tab-button.active {
    color: #c41e3a;
    border-bottom-color: #c41e3a;
}

.tabs-content {
    margin-top: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.tab-body {
    padding: 20px 0;
}

.tab-body h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.tab-body p,
.tab-body li {
    color: #666;
    line-height: 1.8;
    margin-bottom: 12px;
}

.tab-body ul {
    margin-left: 20px;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.specs-table td {
    padding: 12px 0;
}

.spec-label {
    font-weight: 600;
    color: #1a1a1a;
    width: 30%;
}

.spec-value {
    color: #666;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

/* Related Products Section */
.related-products-section {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 2px solid #e0e0e0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    text-align: center;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.related-product-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.related-product-card:hover {
    border-color: #c41e3a;
    box-shadow: 0 4px 16px rgba(196, 30, 58, 0.1);
    transform: translateY(-4px);
}

.related-product-image {
    width: 100%;
    height: 200px;
    background: #f9f9f9;
    overflow: hidden;
}

.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-product-card:hover .related-product-image img {
    transform: scale(1.05);
}

.related-product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.related-product-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.4;
    min-height: 2.8em;
}

.related-product-name a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-product-name a:hover {
    color: #c41e3a;
}

.related-product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #c41e3a;
    margin-bottom: 10px;
}

.btn-view-related {
    display: inline-block;
    padding: 8px 12px;
    background: #f5f5f5;
    color: #1a1a1a;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-view-related:hover {
    background: #c41e3a;
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-details-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-title {
        font-size: 1.7rem;
    }

    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-details-section {
        padding: 40px 15px;
    }

    .product-title {
        font-size: 1.5rem;
    }

    .product-price {
        font-size: 1.5rem;
    }

    .product-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .tabs-header {
        gap: 10px;
    }

    .tab-button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
}

@media (max-width: 576px) {
    .product-details-section {
        padding: 30px 12px;
    }

    .breadcrumb-nav {
        font-size: 0.8rem;
    }

    .product-title {
        font-size: 1.2rem;
    }

    .product-price {
        font-size: 1.3rem;
    }

    .product-features {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .add-to-cart-section {
        padding: 15px;
    }

    .tabs-header {
        gap: 0;
        flex-wrap: wrap;
    }

    .tab-button {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .related-products-grid {
        grid-template-columns: 1fr;
    }

    .quantity-selector {
        width: 100%;
    }

    .qty-btn {
        width: 36px;
        height: 36px;
    }

    #quantity {
        flex: 1;
    }

    .product-meta {
        flex-direction: column;
    }

    .meta-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
