/* ============================================
   FLIPKART BREADCRUMBS FIX - RIGHT ALIGNED
   Move breadcrumbs to right side like Flipkart
   Remove gap above images
   Match exact spacing
   ============================================ */

/* Hide old breadcrumbs section */
.breadcrumbs {
    display: none !important;
}

/* Hide breadcrumbs section above product content */
.breadcrumbs-section {
    display: none !important;
}

.breadcrumbs-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Right align */
    gap: 8px;
    font-size: 12px;
    padding: 0 24px;
    /* Match product content padding */
    font-family: 'Roboto', sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.breadcrumbs-right a {
    color: #878787;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs-right a:hover {
    color: #0a4409;
    text-decoration: none;
}

.breadcrumbs-right i {
    font-size: 8px;
    color: #878787;
}

.breadcrumbs-right span {
    color: #212121;
    font-weight: 500;
}

/* Product header row - breadcrumbs + compare/share (Flipkart style) */
.product-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.breadcrumbs-inline {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 12px;
    font-family: 'Roboto', sans-serif;
    flex: 1;
    overflow-x: auto !important;
    /* Allow horizontal scrolling */
    white-space: nowrap !important;
    /* Prevent wrapping */
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll for iOS */
}

.breadcrumbs-inline::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar for a cleaner look */
}

.breadcrumbs-inline a {
    color: #878787;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs-inline a:hover {
    color: #0a4409;
    text-decoration: none;
}

.breadcrumbs-inline i {
    font-size: 8px;
    color: #878787;
}

.breadcrumbs-inline span {
    color: #212121;
    font-weight: 500;
}

/* Truncate product name in breadcrumb like Flipkart */
#breadcrumbProductInline {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

/* CRITICAL: Product content grid - starts directly below nav with proper spacing */
.product-content {
    display: grid !important;
    grid-template-columns: 37.3% 62.7% !important;
    gap: 0 !important;
    margin-top: 112px !important;
    /* Header (56px) + Nav (56px) = 112px - no breadcrumbs section */
    padding-top: 0 !important;
    position: relative !important;
}

/* CRITICAL: Product info must have top padding to push content below nav */
.product-info {
    margin-top: 0 !important;
    padding-top: 24px !important;
    /* Increased padding to push content down */
    padding-left: 24px !important;
    padding-right: 24px !important;
    padding-bottom: 24px !important;
    background: white !important;
    position: relative !important;
    z-index: 10 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

/* CRITICAL: Remove ALL gaps above images - maximum specificity */
html body main.product-main .product-container .product-content .product-images-wrapper,
html body main.product-main .product-container #productContent .product-images-wrapper,
html body .product-main .product-container .product-content .product-images-wrapper,
html body .product-main .product-container #productContent .product-images-wrapper,
body main.product-main .product-container .product-content .product-images-wrapper,
body main.product-main .product-container #productContent .product-images-wrapper,
body .product-main .product-container .product-content .product-images-wrapper,
body .product-main .product-container #productContent .product-images-wrapper,
.product-main .product-container .product-content .product-images-wrapper,
.product-main .product-container #productContent .product-images-wrapper,
.product-images-wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    background: white !important;
    /* Sticky positioning moved to desktop media query below */
    align-self: start !important;
}

/* Sticky positioning only for Desktop */
@media (min-width: 769px) {
    html body main.product-main .product-container .product-content .product-images-wrapper,
    html body main.product-main .product-container #productContent .product-images-wrapper,
    html body .product-main .product-container .product-content .product-images-wrapper,
    html body .product-main .product-container #productContent .product-images-wrapper,
    body main.product-main .product-container .product-content .product-images-wrapper,
    body main.product-main .product-container #productContent .product-images-wrapper,
    body .product-main .product-container .product-content .product-images-wrapper,
    body .product-main .product-container #productContent .product-images-wrapper,
    .product-main .product-container .product-content .product-images-wrapper,
    .product-main .product-container #productContent .product-images-wrapper,
    .product-images-wrapper {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 112px !important;
        z-index: 100 !important;
    }
}

/* CRITICAL: Remove gap from product-images */
html body main.product-main .product-container .product-content .product-images-wrapper .product-images,
html body main.product-main .product-container #productContent .product-images-wrapper .product-images,
html body .product-main .product-container .product-content .product-images-wrapper .product-images,
html body .product-main .product-container #productContent .product-images-wrapper .product-images,
body main.product-main .product-container .product-content .product-images-wrapper .product-images,
body main.product-main .product-container #productContent .product-images-wrapper .product-images,
body .product-main .product-container .product-content .product-images-wrapper .product-images,
body .product-main .product-container #productContent .product-images-wrapper .product-images,
.product-images-wrapper .product-images,
.product-images {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    padding-bottom: 24px !important;
    border-top: none !important;
}

/* CRITICAL: Product info - remove top padding, add breadcrumbs row */
.product-info {
    margin-top: 0 !important;
    padding-top: 12px !important;
    /* Reduced from 24px - breadcrumbs take space */
    padding-left: 24px !important;
    padding-right: 24px !important;
    padding-bottom: 24px !important;
    background: white !important;
    position: relative !important;
    z-index: 10 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

/* Product header row spacing - very tight like Flipkart */
.product-header-row {
    margin-bottom: 0 !important;
    /* No gap - title comes immediately */
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Product title - very tight spacing like Flipkart */
.product-title {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    /* Tight spacing */
    padding-top: 0 !important;
    padding-right: 120px !important;
    line-height: 1.3 !important;
    /* Tight line-height */
}

/* Rating - very tight spacing like Flipkart */
.product-rating {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    /* Tight spacing */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Price section - very tight spacing like Flipkart */
.product-price-section {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    /* Tight spacing */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Available offers - tight spacing */
.available-offers {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.offers-title {
    margin-bottom: 8px !important;
    /* Tight spacing */
}

.offers-list {
    gap: 4px !important;
    /* Very tight gap between items */
}

/* Responsive */
@media (max-width: 768px) {
    .breadcrumbs-section {
        margin-top: 112px !important;
    }

    .breadcrumbs-right {
        padding: 0 16px;
    }

    .product-header-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 20px !important;
    }

    .breadcrumbs-inline {
        width: 100% !important;
        flex: 0 0 auto !important;
        order: 1 !important;
        display: flex !important;
        white-space: nowrap !important;
        overflow-x: auto !important;
        padding-bottom: 4px;
        /* Space for hidden scrollbar */
    }

    .breadcrumbs-inline i:last-of-type,
    .breadcrumbs-inline span:last-of-type {
        /* Optional: Hide last crumb on very small screens if needed, 
           but horizontal scroll is better. Keep them for now. */
    }

    .product-top-actions {
        position: static !important;
        top: auto !important;
        right: auto !important;
        width: 100% !important;
        order: 2 !important;
        flex: 0 0 auto !important;
    }

    .product-info {
        padding-top: 12px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .product-images-wrapper {
        position: relative !important;
        top: 0 !important;
        z-index: 1 !important;
    }
}