/* Product Detail Page - Premium & Engaging Design */

:root {
    --checkout-primary-gold: #E1B14D;
    --checkout-dark-grey: #2F3133;
    --checkout-secondary-dark: #545759;
    --checkout-muted: #BABABA;
    --checkout-light-bg: #F2F2F2;
}

.product-detail-page {
    padding: 0;
    background: #f8f9fa;
    min-height: 100vh;
}

.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px;
}

@media (min-width: 768px) {
    .product-detail-container {
        padding: 16px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        align-items: start;
    }
}

/* Image Section with Swipe */
.product-image-section {
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(225, 177, 77, 0.1);
}

@media (min-width: 768px) {
    .product-image-section {
        /* Image section not sticky on desktop */
        margin-bottom: 0;
    }
}

.product-image-slider-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.product-image-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.product-image-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.product-image-slide:hover img {
    transform: scale(1.05);
}

/* Navigation Arrows */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    opacity: 0;
}

.product-image-section:hover .slider-nav {
    opacity: 1;
}

.slider-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.slider-prev {
    left: 12px;
}

.slider-next {
    right: 12px;
}

@media (max-width: 768px) {
    .slider-nav {
        opacity: 1;
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .slider-prev {
        left: 8px;
    }
    
    .slider-next {
        right: 8px;
    }
}

/* Image Dots Indicator */
.product-image-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.product-image-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-image-dots .dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.product-image-dots .dot.active {
    background: #fff;
    width: 24px;
    border-radius: 12px;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Product Info Card */
.product-info-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    animation: slideInUp 0.5s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .product-info-card {
        padding: 24px;
    }
}

/* Header Compact */
.product-header-compact {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.product-type-mini {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-type-mini.veg {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.product-type-mini.non-veg {
    background: linear-gradient(135deg, #E42735 0%, #d0202e 100%);
    color: #fff;
}

.product-title-compact {
    font-size: 18px;
    font-weight: 700;
    color: var(--checkout-dark-grey, #2F3133);
    margin: 0;
    line-height: 1.3;
    flex: 1;
    transition: color 0.3s ease;
}

@media (min-width: 768px) {
    .product-title-compact {
        font-size: 20px;
    }
}

/* Pricing Compact */
.product-pricing-compact {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(225, 177, 77, 0.15);
}

.price-primary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.selling-price-compact {
    font-size: 24px;
    font-weight: 700;
    color: var(--checkout-primary-gold, #E1B14D);
}

@media (min-width: 768px) {
    .selling-price-compact {
        font-size: 28px;
    }
}

.original-price-compact {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
    font-weight: 500;
}

.discount-tag {
    background: var(--checkout-primary-gold, #E1B14D);
    color: var(--checkout-dark-grey, #2F3133);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(225, 177, 77, 0.3);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.points-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.points-compact i {
    color: var(--checkout-primary-gold, #E1B14D);
    font-size: 14px;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Subheading Compact */
.product-subheading-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.subheading-pill-mini {
    background: rgba(225, 177, 77, 0.1);
    color: var(--checkout-primary-gold, #E1B14D);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(225, 177, 77, 0.3);
    transition: all 0.3s ease;
}

.subheading-pill-mini:hover {
    background: rgba(225, 177, 77, 0.15);
    border-color: rgba(225, 177, 77, 0.5);
}

.subheading-swatch-mini {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2.5px solid #fff;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.subheading-swatch-mini:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Variant Section Compact */
.variant-section-compact {
    margin-bottom: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(225, 177, 77, 0.15);
}

.variant-heading-compact {
    font-size: 13px;
    font-weight: 700;
    color: var(--checkout-dark-grey, #2F3133);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Variant Grid Image */
.variant-grid-image {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
}

.variant-card-image {
    border: 2.5px solid #e0e0e0;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    position: relative;
    overflow: hidden;
}

.variant-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 178, 87, 0.1) 0%, rgba(0, 178, 87, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.variant-card-image:hover {
    border-color: #10b981;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 178, 87, 0.2);
}

.variant-card-image:hover::before {
    opacity: 1;
}

.variant-card-image.selected {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(0, 178, 87, 0.1) 0%, rgba(0, 178, 87, 0.15) 100%);
    box-shadow: 0 0 0 3px rgba(0, 178, 87, 0.2), 0 8px 20px rgba(0, 178, 87, 0.3);
    transform: scale(1.05);
}

.variant-card-image.selected::before {
    opacity: 1;
}

.variant-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    background: #f5f5f5;
    position: relative;
}

.variant-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.variant-card-image:hover .variant-img-wrapper img {
    transform: scale(1.1);
}

.variant-label {
    font-size: 11px;
    color: #666;
    text-align: center;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.variant-price-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.variant-mrp {
    font-size: 10px;
    color: #999;
    text-decoration: line-through;
    font-weight: 500;
}

.variant-sp {
    font-size: 12px;
    font-weight: 700;
    color: var(--checkout-primary-gold, #E1B14D);
}

/* Variant Chips Compact */
.variant-chips-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variant-chip-compact {
    padding: 10px 18px;
    border: 2.5px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.variant-chip-compact::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 178, 87, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.variant-chip-compact:hover {
    border-color: #10b981;
    background: rgba(0, 178, 87, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 178, 87, 0.15);
}

.variant-chip-compact:hover::before {
    width: 300px;
    height: 300px;
}

.variant-chip-compact.selected {
    border-color: #10b981;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 178, 87, 0.4);
    transform: scale(1.05);
}

.variant-chip-compact.color-swatch {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: 3px solid #e0e0e0;
    position: relative;
}

.variant-chip-compact.color-swatch.selected {
    border-color: #10b981;
    border-width: 3px;
    box-shadow: 0 0 0 3px rgba(0, 178, 87, 0.2), 0 4px 12px rgba(0, 178, 87, 0.3);
}

.variant-chip-compact .color-dot {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
}

/* Variant Rows (Text Label / Color Swatch) - Matching Flutter Design */
.variant-rows-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.variant-row {
    display: flex;
    align-items: flex-start;
    padding: 10px;
    margin-bottom: 6px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-sizing: border-box;
    min-height: auto;
    height: auto;
}

.variant-row:hover {
    background: #f0f0f0;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.variant-row.selected {
    background: rgba(0, 178, 87, 0.05);
    border: 2px solid #10b981;
    box-shadow: 0 2px 8px rgba(0, 178, 87, 0.15);
}

.variant-row-image {
    width: 50px;
    height: 50px;
    min-height: 50px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
    margin-right: 10px;
    align-self: flex-start;
}

.variant-row-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.variant-row-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    align-self: stretch;
}

.variant-row-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--checkout-dark-grey, #2F3133);
    line-height: 1.3;
    word-wrap: break-word;
}

.variant-row.selected .variant-row-name {
    font-weight: 700;
    color: var(--checkout-primary-gold, #E1B14D);
}

.variant-row-subheading {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 4px;
}

.variant-row-subheading .subheading-pill {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(225, 177, 77, 0.12);
    border-radius: 4px;
    font-size: 10px;
    color: var(--checkout-primary-gold, #E1B14D);
    white-space: nowrap;
    font-weight: 600;
}

.variant-row-subheading .subheading-color-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.variant-row-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.variant-price-original {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}

.variant-price-selling {
    font-size: 16px;
    font-weight: 700;
    color: #10b981;
}

.variant-row.selected .variant-price-selling {
    color: var(--checkout-primary-gold, #E1B14D);
}

/* Product Action Compact */
.product-action-compact {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(225, 177, 77, 0.15);
}

/* Return Policy Section */
.return-policy-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(225, 177, 77, 0.15);
}

.return-policy-header {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    user-select: none;
}

.return-policy-header:hover {
    background: rgba(225, 177, 77, 0.05);
}

.return-policy-icon-wrapper {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(225, 177, 77, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(225, 177, 77, 0.2);
}

.return-policy-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.return-policy-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--checkout-primary-gold, #E1B14D);
    font-size: 20px;
}

.return-policy-title-wrapper {
    flex: 1;
}

.return-policy-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--checkout-primary-gold, #E1B14D);
    margin: 0;
    line-height: 1.3;
}

.return-policy-chevron {
    color: var(--checkout-primary-gold, #E1B14D);
    font-size: 14px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.return-policy-header.active .return-policy-chevron {
    transform: rotate(180deg);
}

.return-policy-content {
    padding: 12px 8px 8px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.return-policy-text {
    font-size: 13px;
    color: var(--checkout-dark-grey, #2F3133);
    line-height: 1.6;
}

.return-policy-text p {
    margin: 0 0 8px 0;
}

.return-policy-text p:last-child {
    margin-bottom: 0;
}

.btn-add-compact {
    width: 100%;
    padding: 12px 14px;
    background: var(--checkout-primary-gold, #E1B14D);
    color: var(--checkout-dark-grey, #2F3133);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(225, 177, 77, 0.3);
    position: relative;
    letter-spacing: 0.3px;
}

.btn-add-compact:hover {
    background: #D4A041;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(225, 177, 77, 0.4);
}

.btn-add-compact:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-add-compact:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-add-compact i {
    font-size: 18px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.qty-control-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px;
    border-radius: 8px;
    background: var(--checkout-primary-gold, #E1B14D);
    color: var(--checkout-dark-grey, #2F3133);
    box-shadow: 0 2px 8px rgba(225, 177, 77, 0.3);
}

.qty-btn-compact {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--checkout-dark-grey, #2F3133);
    background: rgba(47, 49, 51, 0.1);
    color: var(--checkout-dark-grey, #2F3133);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.qty-btn-compact:hover {
    background: rgba(47, 49, 51, 0.2);
    transform: scale(1.1);
}

.qty-btn-compact:active {
    transform: scale(0.95);
}

.qty-value-compact {
    font-size: 18px;
    font-weight: 700;
    color: var(--checkout-dark-grey, #2F3133);
    min-width: 30px;
    text-align: center;
}

.btn-notify-compact {
    width: 100%;
    padding: 16px;
    background: #f0f0f0;
    color: #666;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-notify-compact:hover:not(:disabled) {
    background: #e0e0e0;
    border-color: var(--checkout-primary-gold, #E1B14D);
    color: var(--checkout-primary-gold, #E1B14D);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(225, 177, 77, 0.15);
}

.btn-notify-compact.notified,
.btn-notify-compact:disabled {
    background: rgba(225, 177, 77, 0.1);
    border-color: var(--checkout-primary-gold, #E1B14D);
    color: var(--checkout-primary-gold, #E1B14D);
    cursor: not-allowed;
}

/* Description Card */
.product-description-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-top: 8px;
    animation: slideInUp 0.6s ease;
    border: 1px solid rgba(225, 177, 77, 0.1);
}

@media (min-width: 768px) {
    .product-description-card {
        grid-column: 1 / -1;
        padding: 18px;
    }
}

.description-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--checkout-primary-gold, #E1B14D);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.description-content {
    font-size: 13px;
    line-height: 1.6;
    color: var(--checkout-dark-grey, #2F3133);
}

.description-content p {
    margin: 0 0 14px 0;
}

.description-content p:last-child {
    margin-bottom: 0;
}

.description-content h1,
.description-content h2,
.description-content h3,
.description-content h4,
.description-content h5,
.description-content h6 {
    margin: 18px 0 10px 0;
    font-weight: 700;
    color: #1a1a1a;
}

.description-content ul,
.description-content ol {
    margin: 14px 0;
    padding-left: 24px;
}

.description-content li {
    margin-bottom: 8px;
}

.description-content strong,
.description-content b {
    font-weight: 700;
    color: #1a1a1a;
}

.description-content a {
    color: var(--checkout-primary-gold, #E1B14D);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.description-content a:hover {
    text-decoration: underline;
    color: #D4A041;
}

/* Related Products */
.related-products-section {
    margin-top: 12px;
}

@media (min-width: 768px) {
    .related-products-section {
        grid-column: 1 / -1;
    }
}

.related-section {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 12px;
}

.related-heading {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Product Not Found */
.product-not-found {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    margin: 20px;
}

.product-not-found i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.product-not-found h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 12px;
}

.product-not-found p {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
}

.btn-back-home {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 178, 87, 0.3);
}

.btn-back-home:hover {
    background: linear-gradient(135deg, #059669 0%, #00994a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 178, 87, 0.4);
}
