/* Product Detail Page Styles */
body {
    font-family: Arial, Serif, Helvetica Neue;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    box-sizing: border-box;
}

/* Navbar styling specific to product page - inherits from main navbar */
.product-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    padding: 20px 40px;
    background: rgba(212, 212, 212, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(50px);
    border-radius: 20px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.nav-active {
    font-weight: 700;
    color: #D06AFF;
}

/* Main product container */
.product-detail-container {
    max-width: 1300px;
    margin: 150px auto 40px;
    padding: 0 40px;
}

.product-content {
    display: flex;
    /* gap: 40px; */
}

/* Product image section */
.product-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 600px;
}

.product-image {
    position: relative;
    height: 450px;
    border: 1px solid rgb(219, 219, 219);
    /* background-color: #FAF1FF; */
    display: flex;
    justify-content: center;
    align-items: center;
    /* box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.05); */
    margin-bottom: 20px;
}

.product-image img {
    max-height: 85%;
    max-width: 85%;
    object-fit: contain;
    transform: scale(0.85);
}

.wishlist-btn {
    position: absolute;
    top: 20px;
    right: -20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 26px;
    color: #D06AFF;
}

/* Product info section */
.product-info {
    flex: 1;
    padding: 0;
    max-width: 90%;
    margin: 0 auto;
}

.product-title {
    font-size: 32px;
    font-weight: 500;
    color: #000000;
    margin: 0 0 10px;
    line-height: 1.2;
    text-align: left;
    display: inline-block;
}

.product-price {
    font-size: 32px;
    font-weight: 700;
    color: rgb(216, 136, 252);
    text-align: left;
    line-height: 1.2;
}

.rating {
    display: flex;
    align-items: center;
    margin: 10px 0 15px 0;
}

.stars {
    display: flex;
    gap: 5px;
}

.stars i.filled {
    color: #D883FF;
}

.stars i.half-filled {
    background: linear-gradient(90deg, #D883FF 80%, #D4D4D4 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stars i.empty {
    color: #D4D4D4;
}

.review-count {
    margin-left: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
}

.divider {
    height: 1px;
    background-color: #000000;
    margin: 25px 0;
}

/* Description section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0;
    padding-right: 20px;
}

.section-header:hover {
    opacity: 0.8;
}

.section-header h3 {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    flex: 1;
}

.collapse-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    padding: 5px;
    min-width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-content {
    padding: 0 20px;
    margin-bottom: 30px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    max-height: 0;
}

.section-content[style*="max-height: 0px"] {
    opacity: 0.7;
}

.product-description {
    font-size: 16px;
    line-height: 1.5;
    color: rgb(84, 84, 84);
    margin-bottom: 20px;
}

.feature-list {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    margin: 20px 0;
    width: 100%;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    padding: 0 5px;
}

.feature-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background-color: #D06AFF;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 20px;
    margin-bottom: 10px;
}

.feature p {
    font-size: 14px;
    color: #7C7C7C;
    margin: 0;
    text-align: center;
    width: 100%;
    line-height: 1.3;
}

/* CTA buttons */
.cta-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    width: 100%;
    height: 60px; /* Fixed height to prevent size changes */
    min-height: 60px; /* Ensure minimum height */
}

.cart-btn, .buy-btn {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    transition: all 0.3s ease;
    height: 80%; /* Take full height of container */
}

.cart-btn {
    background-color: #ffffff;
    border: 1px solid #000000;
    color: #000000;
    gap: 10px;
}

.buy-btn {
    background-color: #A703F3;
    border: none;
    color: white;
}

.cart-btn:hover {
    background-color: #f5f5f5;
}

.buy-btn:hover {
    background-color: #8F02D0;
}

/* Recommended Products Section */
.recommended-products {
    max-width: 1300px;
    margin: 90px auto;
    padding: 0 40px;
}

.recommended-products h2 {
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 30px;
    text-align: left;
}

/* Force exact match with home page product cards */
.product-cards-container {
    display: flex;
    gap: 20px;
    justify-content: flex-start !important; /* Align left */
    height: 400px !important;
    margin-top: 40px;
    width: 100% !important;
}

.product-cards-container .product-card {
    height: 450px !important;
    width: 300px !important; /* Updated to match homepage width */
    flex: none !important;
    max-width: 300px !important; /* Updated to match homepage width */
}

.product-cards-container .product-image {
    height: 360px !important;
    width: 100% !important;
    border: 1px solid rgb(219, 219, 219) !important;
    background-color: #FAF1FF !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
}

.product-cards-container .product-image img {
    height: 270px !important;
    width: 90% !important;
    object-fit: contain !important;
    transform: scale(0.85) !important;
}

.product-details {
    padding: 6px 0 0 0px !important;
    height: 70px !important;
    font-size: 1.1rem !important;
    line-height: 1.6rem !important
    margin-top: 0 !important;
}

.product-details .text1 {
    color:rgb(42, 42, 42);
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 280px !important; /* Updated to match homepage width */
}

.product-details .text2 {
    font-weight: 600 !important;
    color: rgb(216, 136, 252) !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 280px !important; /* Updated to match homepage width */
}

.product-details h3 {
    font-size: 16px;
    font-weight: normal;
    color: rgb(212, 212, 212);
    margin: 0;
    line-height: 1.6rem;
}

.price {
    font-size: 16px;
    font-weight: 600;
    color: rgb(216, 136, 252);
    margin: 0;
}

.new-tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #A703F3;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Recommended Products Section Styles */
.product-cards-container.productcards {
    height: 400px;
    justify-content: flex-start;
}

.product-cards-container .product-card.one,
.product-cards-container .product-card.two, 
.product-cards-container .product-card.three {
    width: 300px;
    height: 450px;
}

.product-cards-container .product-image.imagecontainerphoto {
    height: 360px;
}

.product-cards-container .product-image.imagecontainerphoto img {
    height: 270px;
    width: 90%;
}

.product-cards-container .product-details.cardpara {
    height: 70px;
    /* background-color: black; */
}

.product-cards-container .product-details .text1,
.product-cards-container .product-details .text2 {
    max-width: 280px;
}

/* Mobile details wrapper styles */
.mobile-details-wrapper {
    background-color: #fff;
    padding: 12px;
    margin-bottom: 0;
}

.mobile-details-wrapper .product-title {
    font-size: 20px;
    margin: 0 0 6px 0;
    color: #000;
    font-weight: normal;
}

.mobile-details-wrapper .rating {
    margin: 0 0 12px 0;
}

.mobile-details-wrapper .stars {
    color: #C764FF;
    font-size: 14px;
}

.mobile-details-wrapper .review-count {
    font-size: 14px;
    color: #5f75e6;
    margin-left: 5px;
}

/* Price container styling */
.mobile-price-container {
    display: flex;
    align-items: center;
    margin: 10px 0 30px 0;
    flex-wrap: wrap;
}

.mobile-price-container .original-price {
    font-size: 22px;
    color: #cccccc;
    text-decoration: line-through;
    margin-right: 10px;
}

.mobile-price-container .current-price {
    font-size: 22px;
    color: #C764FF;
    font-weight: 600;
    margin-right: 10px;
}

.mobile-price-container .discount-label {
    display: inline-block;
    background-color: #C764FF;
    color: white;
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 5px;
    font-weight: 500;
}

/* Quantity selector styling */
.qty-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.mobile-details-wrapper .quantity-selector {
    margin: 4px 0 16px;
    display: flex;
    align-items: center;
}

.mobile-details-wrapper .quantity-input {
    width: 42px;
    height: 42px;
    text-align: center;
    font-size: 18px;
    border: none;
    background: #f5f5f5;
}

.mobile-details-wrapper .quantity-btn {
    width: 42px;
    height: 42px;
    background-color: #f5f5f5;
    border: none;
    color: #444;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-details-wrapper .quantity-label {
    margin-left: 12px;
    font-size: 16px;
    color: #555;
}

/* CTA buttons styling */
.mobile-details-wrapper .cta-buttons {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    height: 48px;
}

.mobile-details-wrapper .buy-btn {
    background-color: #C764FF;
    color: white;
    font-size: 16px;
    border: none;
    flex: 1;
    border-radius: 6px;
    height: 100%;
}

.mobile-details-wrapper .cart-btn {
    background-color: white;
    color: #000;
    font-size: 16px;
    border: 1px solid #000;
    flex: 1;
    border-radius: 6px;
    height: 100%;
}

/* Responsive styles */
@media (max-width: 1200px) {
    .product-content {
        flex-direction: column;
    }
    
    .product-card {
        max-width: 100%;
    }
    
    .product-title {
        font-size: 28px;
    }
    
    .product-price {
        font-size: 28px;
    }
    
    .cta-buttons {
        margin-bottom: 30px;
    }
    
    .product-cards-container {
        flex-wrap: wrap;
    }
    
    .product-cards-container .product-card {
        max-width: 45%;
    }
}

@media (max-width: 768px) {
    .product-navbar {
        width: 95%;
        padding: 12px 20px;
    }
    
    .product-detail-container {
        margin-top: 140px;
    }
    
    .product-image {
        height: 400px;
    }
    
    .product-title {
        font-size: 24px;
    }
    
    .product-price {
        font-size: 24px;
    }
    
    .cta-buttons {
        flex-direction: row;
    }
    
    .product-cards-container .product-card {
        max-width: 100%;
    }
    
    .product-info {
        max-width: 95%;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .product-navbar {
        width: 90%;
        padding: 10px 20px;
        margin: 20px auto;
        border-radius: 30px;
        background: rgba(255, 255, 255, 0.95);
    }
    
    .product-detail-container {
        /* margin-top: 100px; */
        /* padding: 0 15px; */
    }
}

@media (max-width: 480px) {
    .product-navbar {
        width: 100% !important;
        margin: 0 !important;
        border-radius: 20px !important;
        padding: 15px 25px !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        background: rgba(212, 212, 212, 0.6) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        position: fixed !important;
        z-index: 1000 !important;
    }
    
    /* Adjust the product content layout for mobile */
    .product-content {
        display: flex;
        flex-direction: column;
    }
    
    .product-detail-container {
        margin-top: 120px;
        padding: 0;
    }
    
    .product-card {
        max-width: 100%;
        display: flex;
        align-items: center;
        margin-bottom: 0;
    }
    
    .product-image {
        height: 300px;
        margin-bottom: 0;
        border-radius: 0;
        border: none;
    }
    
    /* Style the product info section */
    .product-info {
        padding-top: 0;
        padding-bottom: 0;
        max-width: 100%;
        margin: 0;
    }
    
    .product-info > div:last-of-type {
        border-bottom: none;
    }
    
    /* Hide original CTA buttons */
    .product-card > .cta-buttons {
        display: none;
    }
    
    /* Hide existing divider in mobile view */
    .product-info > .divider {
        display: none;
    }
    
    /* Section styling */
    .description-section,
    .shipping-section,
    .warranty-section,
    .policy-section {
        margin: 0;
        padding: 0;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 5px; /* Add slight spacing between sections */
    }
    
    /* Add a small margin to the divider */
    .divider {
        margin: 5px 0;
        height: 1px;
        background-color: #f0f0f0;
        opacity: 0.5;
    }
    
    .section-header {
        margin: 0;
        padding: 5px 15px;
        width: 100%;
        min-height: 28px;
        border-bottom: none;
    }
    
    .section-header h3 {
        font-size: 14px;
        font-weight: 500;
        flex: 1;
        color: #333;
    }
    
    .collapse-btn {
        width: 24px;
        height: 24px;
        font-size: 10px;
        min-width: 24px;
        color: #888;
    }
    
    /* Remove padding from section content to reduce whitespace */
    .section-content {
        padding: 2px 15px 2px;
        margin: 0;
        font-size: 13px;
        line-height: 1.4;
        transition: max-height 0.3s ease, opacity 0.3s ease;
    }
    
    .product-description {
        font-size: 14px;
        line-height: 1.5;
        margin: 4px 0 6px;
    }
    
    /* Feature list in mobile view */
    .feature-list {
        flex-direction: column;
        gap: 8px;
        margin: 8px 0;
        align-items: flex-start;
        width: 100%;
    }
    
    .feature {
        flex-direction: row;
        width: 100%;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        padding: 0;
    }
    
    .feature-icon {
        width: 42px;
        height: 42px;
        font-size: 16px;
        margin-right: 15px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .feature p {
        text-align: left;
        font-size: 14px;
        flex: 1;
        margin: 0;
    }
    
    /* Make recommended products section flush with the sections above */
    .recommended-products {
        border-top: 1px solid #f0f0f0;
        padding: 0;
        margin: 0;
    }
    
    .recommended-products h2 {
        font-size: 22px;
        margin: 15px 0 10px;
        padding-left: 15px;
    }
    
    /* Style the product cards container to match home page */
    .product-cards-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 0 15px !important;
        height: auto !important;
        margin-top: 15px !important;
    }
    
    /* Style the individual product cards */
    .product-animation-container,
    .product-cards-container .product-card.one,
    .product-cards-container .product-card.two,
    .product-cards-container .product-card.three {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin-bottom: 15px !important;
    }
    
    /* Style the product images */
    .product-cards-container .product-image.imagecontainerphoto {
        height: auto !important;
        aspect-ratio: 1/1 !important;
        padding: 15px !important;
        background-color: #FAF1FF !important;
        border: none !important;
    }
    
    /* Style the product text */
    .product-cards-container .product-details .text1 {
        font-size: 14px !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }
    
    /* Hide desktop Buy Now/Add to Cart buttons on mobile */
    .product-info .cta-buttons {
        display: none !important;
    }
}

@media (max-width: 375px) {
    /* Extra small devices (iPhone SE, etc) */
    .recommended-products {
        padding: 0 8px;
    }
    
    .recommended-products h2 {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
    
    .product-cards-container {
        gap: 8px !important;
    }
    
    .product-cards-container .product-animation-container,
    .product-cards-container .product-card.one,
    .product-cards-container .product-card.two,
    .product-cards-container .product-card.three {
        width: calc(50% - 4px) !important;
        max-width: calc(50% - 4px) !important;
        flex: 0 0 calc(50% - 4px) !important;
    }
    
    .product-cards-container .product-image.imagecontainerphoto {
        padding: 8px !important;
    }
    
    .product-cards-container .product-image.imagecontainerphoto img {
        width: 75% !important;
    }
    
    .product-cards-container .product-details.cardpara {
        padding: 3px 0 !important;
        font-size: 0.75rem !important;
        line-height: 1.1rem !important;
    }
    
    .product-cards-container .product-details .text1,
    .product-cards-container .product-details .text2 {
        font-size: 0.75rem !important;
    }
}

/* Notification Popup - MOVED TO cart.css */
/* All notification popup styles have been moved to cart.css */

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    margin: 30px 0;
}

.quantity-selector .quantity-btn {
    width: 40px;
    height: 40px;
    background-color: white;
    border: 1px solid #e0e0e0;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color:rgb(199, 98, 243);
}

.quantity-selector .quantity-btn:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.quantity-selector .quantity-btn:last-of-type {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.quantity-selector .quantity-input {
    width: 55px;
    height: 40px;
    border: none;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
    font-size: 20px;
    background-color: white;
    padding: 0;
}

.quantity-selector .quantity-input:focus {
    outline: none;
}

.quantity-label {
    margin-left: 15px;
    font-size: 18px;
    color: #666;
}

.plus-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #A703F3;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.plus-btn:hover {
    background: #8F02D0;
    transform: scale(1.1);
}

/* Shopping Cart Styles - MOVED TO cart.css */
/* All cart styles have been moved to cart.css */

/* ... existing code ... */

/* Reset any conflicting styles and fix the layout with direct selectors */
@media (max-width: 480px) {
    .recommended-products {
        padding: 0;
        margin: 30px 0;
    }
    
    .recommended-products h2 {
        font-size: 22px;
        margin-bottom: 20px;
        padding-left: 15px;
    }
    
    /* Force grid layout with direct selector */
    section.recommended-products .product-cards-container,
    section.recommended-products .product-cards-container.productcards {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        grid-gap: 10px !important;
        /* padding: 0 10px !important; */
        flex-wrap: nowrap !important;
        flex-direction: unset !important;
        height: auto !important;
        margin-top: 15px !important;
        width: 100% !important;
        justify-content: center !important;
    }
    
    /* Reset card dimensions */
    section.recommended-products .product-animation-container,
    section.recommended-products .product-card.one,
    section.recommended-products .product-card.two,
    section.recommended-products .product-card.three {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        flex: 0 0 100% !important;
    }
    
    /* Style product images */
    section.recommended-products .product-image.imagecontainerphoto {
        height: auto !important;
        aspect-ratio: 1/1 !important;
        background-color: #FAF1FF !important;
        position: relative !important;
        padding: 10px !important;
        border: none !important;
        margin: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    section.recommended-products .product-image.imagecontainerphoto img {
        max-height: 80% !important;
        max-width: 80% !important;
        object-fit: contain !important;
    }
    
    /* Text styling */
    section.recommended-products .product-details.cardpara {
        padding: 8px 2px !important;
        height: auto !important;
        margin-top: 5px !important;
    }
    
    section.recommended-products .product-details .text1 {
        font-size: 14px !important;
        line-height: 1.3 !important;
        color: #000 !important;
        display: block !important;
        margin-bottom: 2px !important;
        font-weight: normal !important;
    }
    
    section.recommended-products .product-details .text2 {
        font-size: 14px !important;
        line-height: 1.3 !important;
        color: #C764FF !important;
        font-weight: 600 !important;
        display: block !important;
    }
    
    /* Button positioning */
    section.recommended-products .wishlist-btn {
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        font-size: 20px !important;
        color: #C764FF !important;
        z-index: 10 !important;
        background: transparent !important;
        border: none !important;
    }
    
    section.recommended-products .plus-btn {
        position: absolute !important;
        bottom: 10px !important;
        right: 10px !important;
        background: #A703F3 !important;
        color: white !important;
        border-radius: 50% !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: none !important;
        z-index: 10 !important;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .recommended-products {
        padding: 0;
    }
    
    .recommended-products h2 {
        font-size: 20px;
        padding-left: 10px;
    }
    
    section.recommended-products .product-cards-container,
    section.recommended-products .product-cards-container.productcards {
        gap: 6px !important;
        padding: 0 8px !important;
    }
    
    section.recommended-products .product-image.imagecontainerphoto {
        padding: 8px !important;
    }
    
    section.recommended-products .product-details .text1,
    section.recommended-products .product-details .text2 {
        font-size: 12px !important;
    }
}

/* Hide duplicate buttons */
@media (min-width: 481px) {
    /* Hide mobile Buy Now/Add to Cart buttons on desktop */
    .mobile-details-wrapper .cta-buttons {
        display: none !important;
    }
}

@media (max-width: 480px) {
    /* Hide desktop Buy Now/Add to Cart buttons on mobile */
    .product-info .cta-buttons {
        display: none !important;
    }
} 