/* =====================================================
   ORDER TRACKING UI
===================================================== */
.tracking-preview {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    margin-top: 30px;
    border: 1px solid #eeeeee;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.tracking-header h2 {
    margin: 0 0 5px;
    font-size: 24px;
}

.tracking-header p {
    margin: 0;
    color: #777;
}

.tracking-status {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.tracking-status.shipped {
    background: #fff0f5;
    color: #e35486;
}

/* Courier */
.tracking-courier-section {
    margin-bottom: 25px;
}

.tracking-courier-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.tracking-courier-section select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
}

/* Tracking information */
.tracking-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.tracking-info-box {
    background: #fafafa;
    border: 1px solid #eeeeee;
    border-radius: 10px;
    padding: 16px;
}

.tracking-label {
    display: block;
    color: #777;
    font-size: 13px;
    margin-bottom: 7px;
}

.tracking-info-box strong {
    font-size: 15px;
}

/* Timeline */
.tracking-timeline {
    position: relative;
    margin: 30px 0;
}

.tracking-timeline::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: #ddd;
}

.tracking-step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.tracking-icon {
    position: relative;
    z-index: 2;

    width: 36px;
    height: 36px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eeeeee;
    color: #777;

    font-weight: bold;
}

.tracking-step.completed .tracking-icon {
    background: #e35486;
    color: white;
}

.tracking-step.current .tracking-icon {
    background: #e35486;
    color: white;
    box-shadow: 0 0 0 5px #fde7ef;
}

.tracking-step-content {
    display: flex;
    flex-direction: column;
    padding-top: 3px;
}

.tracking-step-content strong {
    font-size: 15px;
}

.tracking-step-content span {
    color: #777;
    font-size: 13px;
    margin-top: 4px;
}

/* Track button */
.track-shipment-btn {
    width: 100%;
    padding: 14px;

    border: none;
    border-radius: 8px;

    background: #e35486;
    color: white;

    font-size: 16px;
    font-weight: 600;

    cursor: pointer;
    transition: 0.2s;
}

.track-shipment-btn:hover {
    opacity: 0.9;
}

/* Mobile */
@media (max-width: 768px) {
    .tracking-preview {
        padding: 18px;
    }

    .tracking-header {
        align-items: flex-start;
        gap: 15px;
        flex-direction: column;
    }

    .tracking-info-grid {
        grid-template-columns: 1fr;
    }
}

.logout-btn {
    margin-top: 12px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    background: #d9534f;
    font-size: 15px;
    cursor: pointer;
}

.logout-btn:hover {
    opacity: 0.9;
}

/* =========================================================
   FINAL FIX: TABLET + MOBILE DROPDOWNS
   ========================================================= */
/* Desktop: hover dropdown only */
@media (min-width: 1025px) and (hover: hover) {
    .nav-dropdown:hover>.dropdown-menu {
        display: block !important;
    }

    .dropdown-menu.mobile-open {
        display: none !important;
    }
}

/* Tablet + Mobile: click/tap dropdown only */
@media (max-width: 1024px) {
    .nav-dropdown {
        position: relative !important;
    }

    /* Disable hover opening on touch devices */
    .nav-dropdown:hover>.dropdown-menu {
        display: none !important;
    }

    /* Open only through JavaScript click */
    .nav-dropdown>.dropdown-menu.mobile-open {
        display: block !important;
        position: fixed !important;
        width: min(240px, calc(100vw - 20px)) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 20px) !important;
        max-height: 70vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 8px 0 !important;
        background: #ffffff !important;
        border: 1px solid #dddddd !important;
        border-radius: 8px !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25) !important;
        z-index: 999999 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .dropdown-menu.mobile-open a {
        display: block !important;
        width: 100% !important;
        min-height: 44px !important;
        padding: 12px 16px !important;
        color: #333333 !important;
        background: #ffffff !important;
        white-space: normal !important;
        text-decoration: none !important;
        cursor: pointer !important;
    }

    .dropdown-menu.mobile-open a:active,
    .dropdown-menu.mobile-open a:hover {
        background: #f3f3f3 !important;
    }

    .dropdown-btn {
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }
}

/* Prevent accidental hover on touch devices */
@media (hover: none) and (pointer: coarse) {
    .nav-dropdown:hover>.dropdown-menu {
        display: none !important;
    }

    .nav-dropdown>.dropdown-menu.mobile-open {
        display: block !important;
    }
}

/* =====================================================
   SEARCH RESULTS PAGE - RESPONSIVE DESIGN
===================================================== */
/* Search Results Header */
.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.search-results-header h1 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

/* Continue Shopping Button */
.search-results-header .btn-secondary {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    background-color: #f1f1f1;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.search-results-header .btn-secondary:hover {
    background-color: #ddd;
}

/* Search Product Grid */
#searchProductGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

/* No Search Results */
#searchNoResults {
    width: 100%;
    box-sizing: border-box;
}

#searchNoResults h2 {
    margin-bottom: 10px;
    color: #333;
}

#searchNoResults p {
    color: #666;
    font-size: 15px;
}

/* =====================================================
   TABLET RESPONSIVE - 768px to 1024px
===================================================== */
@media (max-width: 1024px) {
    .search-results-header {
        margin-bottom: 22px;
    }

    .search-results-header h1 {
        font-size: 24px;
    }

    #searchProductGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

/* =====================================================
   MOBILE RESPONSIVE - 767px and below
===================================================== */
@media (max-width: 767px) {
    .search-results-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin-bottom: 20px;
    }

    .search-results-header h1 {
        font-size: 22px;
        text-align: center;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .search-results-header .btn-secondary {
        width: 100%;
        padding: 12px 15px;
        font-size: 14px;
    }

    #searchProductGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    #searchNoResults {
        padding: 30px 15px !important;
    }

    #searchNoResults h2 {
        font-size: 20px;
    }

    #searchNoResults p {
        font-size: 14px;
    }
}

/* =====================================================
   SMALL MOBILE - 480px and below
===================================================== */
@media (max-width: 480px) {
    #searchProductGrid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .search-results-header h1 {
        font-size: 20px;
    }
}

/* =====================================================
   FINAL RISHTABOX HEADER RESPONSIVE FIX
   Correct class: .nav-actions
   ===================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

.header,
.nav-container {
    width: 100%;
    max-width: 100%;
}

/* =====================================================
   TABLET: 769px TO 1024px
   ===================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-container {
        display: grid !important;
        grid-template-columns: minmax(180px, 1fr) minmax(280px, 1.5fr) !important;
        grid-template-areas: "logo actions" "search search" !important;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
    }

    .logo-section {
        grid-area: logo !important;
        min-width: 0;
        display: flex;
        align-items: center;
    }

    .search-bar {
        grid-area: search !important;
        width: 100%;
        max-width: none;
        min-width: 0;
        margin: 0;
    }

    .nav-actions {
        grid-area: actions !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end;
        align-items: stretch;
        gap: 7px;
        width: 100%;
        min-width: 0;
    }

    .nav-actions .nav-btn {
        flex: 1 1 0;
        min-width: 0;
        max-width: 150px;
        padding: 10px 6px;
        font-size: 14px;
        text-align: center;
        white-space: normal;
    }

    .mobile-menu-btn {
        display: none !important;
    }
}

/* =====================================================
   MOBILE: 768px AND BELOW
   ===================================================== */
@media (max-width: 768px) {
    .nav-container {
        display: grid !important;
        grid-template-columns: minmax(105px, 1fr) minmax(0, 2fr) !important;
        grid-template-areas: "logo actions" "search search" !important;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
    }

    /* LOGO */
    .logo-section {
        grid-area: logo !important;
        display: flex;
        align-items: center;
        gap: 5px;
        min-width: 0;
    }

    .logo-section .logo img {
        width: 62px;
        height: 62px;
        object-fit: contain;
    }

    .logo-section .logo-text {
        font-size: 20px;
        line-height: 0.95;
    }

    /* ACCOUNT, CART AND ORDERS */
    .nav-actions {
        grid-area: actions !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end;
        align-items: stretch;
        gap: 5px;
        width: 100%;
        min-width: 0;
    }

    .nav-actions .nav-btn {
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        min-width: 0;
        min-height: 58px;
        padding: 6px 3px;
        font-size: 11px;
        line-height: 1.2;
        text-align: center;
        white-space: normal;
        overflow-wrap: normal;
    }

    .nav-actions .nav-btn span {
        max-width: 100%;
    }

    /* SEARCH */
    .search-bar {
        grid-area: search !important;
        width: 100%;
        max-width: none;
        min-width: 0;
        margin: 0;
    }

    .search-bar input {
        width: 100%;
        min-width: 0;
        height: 44px;
        font-size: 15px;
    }

    .search-bar button {
        flex-shrink: 0;
        padding: 0 16px;
        font-size: 13px;
    }

    /* SHOP NAVIGATION */
    .panel {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: visible;
        white-space: nowrap;
    }

    .panel>* {
        flex-shrink: 0;
    }

    .mobile-menu-btn {
        display: none !important;
    }
}

/* =====================================================
   SMALL MOBILE: 480px AND BELOW
   ===================================================== */
@media (max-width: 480px) {
    .nav-container {
        grid-template-columns: 92px minmax(0, 1fr) !important;
        gap: 8px;
        padding: 8px;
    }

    .logo-section .logo img {
        width: 55px;
        height: 55px;
    }

    .logo-section .logo-text {
        display: none;
    }

    .nav-actions {
        gap: 3px;
    }

    .nav-actions .nav-btn {
        min-height: 53px;
        font-size: 10px;
        border-radius: 10px;
    }

    .search-bar input {
        height: 42px;
        font-size: 14px;
    }

    .search-bar button {
        padding: 0 12px;
        font-size: 12px;
    }
}

/* =====================================================
   FIX NAVIGATION TEXT WRAPPING
   ===================================================== */
.nav-actions .nav-btn {
    overflow: hidden;
}

.nav-actions .nav-icon {
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-actions .nav-label {
    display: inline-block;
    min-width: 0;
    white-space: nowrap;
    text-align: center;
}

/* Tablet and mobile */
@media (max-width: 768px) {
    .nav-actions .nav-btn {
        justify-content: center;
        align-items: center;
        gap: 3px;
    }

    .nav-actions .nav-label {
        font-size: 12px;
        white-space: nowrap;
    }

    .nav-actions .nav-icon {
        font-size: 14px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .nav-actions .nav-btn {
        padding: 5px 3px;
    }

    .nav-actions .nav-label {
        font-size: 10px;
    }

    .nav-actions .nav-icon {
        font-size: 12px;
    }
}

/* =====================================================
   BOTTOM NAVIGATION
   LAPTOP + TABLET + MOBILE
   ===================================================== */
.mobile-bottom-nav {
    position: fixed;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 8px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 74px;
    padding: 8px 12%;
    background: #ffffff;
    border-top: 1px solid #dddddd;
    box-shadow: 0 -3px 15px rgba(0, 0, 0, 0.15);
    z-index: 9999;
}

.bottom-nav-item {
    max-width: 220px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.bottom-nav-item:hover {
    background: #fce4ed;
}

.bottom-cart-count {
    line-height: 15px;
    text-align: center;
}

/* Fixed bar ke peeche content hide na ho */
body {
    padding-bottom: 85px;
}

/* =====================================================
   TABLET
   ===================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .mobile-bottom-nav {
        height: 72px;
        padding: 8px 8%;
        gap: 5px;
    }

    .bottom-nav-item {
        font-size: 13px;
    }

    .bottom-nav-icon {
        font-size: 21px;
    }
}

/* =====================================================
   MOBILE
   ===================================================== */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        height: 66px;
        padding: 5px 3px;
        gap: 2px;
    }

    .bottom-nav-item {
        font-size: 10px;
        gap: 3px;
    }

    .bottom-nav-icon {
        font-size: 19px;
    }

    .bottom-cart-count {
        top: 1px;
        right: 12%;
    }

    body {
        padding-bottom: 75px;
    }
}

/* =====================================================
   SMALL MOBILE
   ===================================================== */
@media (max-width: 480px) {
    .mobile-bottom-nav {
        height: 64px;
    }

    .bottom-nav-item {
        font-size: 9px;
    }

    .bottom-nav-icon {
        font-size: 18px;
    }
}

/* =====================================================
   CONTINUE TO PAYMENT BUTTON
   ===================================================== */
.checkout-btn {
    display: block;
    width: 100%;
    min-height: 50px;
    margin-top: 20px;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    background: #e84b86;
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.checkout-btn:hover {
    background: #d93670;
}

#cartPage {
    padding-bottom: 120px;
}

@media (max-width: 768px) {
    #cartPage {
        padding-bottom: 100px;
    }

    .checkout-btn {
        min-height: 52px;
        font-size: 16px;
    }
}

/* =====================================================
   CHECKOUT ORDER SUMMARY - IMAGE FIX
   ===================================================== */
#orderPage {
    padding-bottom: 120px;
    overflow-x: hidden;
}

#orderSteps {
    margin: 0 auto;
    padding: 20px;
}

/* Each product row */
/* Product image size FIX */
/* Product information */
#orderSteps .order-item-info {
    overflow-wrap: anywhere;
}

#orderSteps .order-item-info h4 {
    color: #1d2939;
}

#orderSteps .order-item-info p {
    color: #555555;
}

#orderSteps .order-item>strong {
    color: #222222;
}

/* Price summary */
#orderSteps .price-summary {
    background: #f8f8f8;
}

/* Buttons */
#orderSteps .order-actions {
    padding-bottom: 30px;
}

#orderSteps .order-actions button {
    cursor: pointer;
}

/* =====================================================
   TABLET AND MOBILE
   ===================================================== */
@media (max-width: 768px) {
    #orderSteps {
        padding: 12px;
    }

    #orderSteps .order-item {
        gap: 10px;
        padding: 10px;
    }

    #orderSteps .order-item img {
        flex: 0 0 75px;
        width: 75px !important;
        height: 75px !important;
        max-width: 75px !important;
        max-height: 75px !important;
    }

    #orderSteps .order-item-info h4 {
        font-size: 14px;
    }

    #orderSteps .order-item-info p {
        font-size: 12px;
    }

    #orderSteps .order-item>strong {
        font-size: 13px;
    }

    #orderSteps .price-summary {
        padding: 15px;
    }

    #orderSteps .order-actions {
        flex-direction: column;
    }

    #orderSteps .order-actions button {
        width: 100%;
    }
}

/* =====================================================
   FINAL ORDER SUMMARY FIX
   MOBILE + TABLET + LAPTOP
===================================================== */
/* Main checkout container */
#orderSteps {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* Order container */
#orderSteps .order-container {
    display: block !important;
    width: 100% !important;
    min-width: 0;
    overflow: hidden;
}

/* Header */
#orderSteps .order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

/* IMPORTANT:
   Summary must not display as multiple columns */
#orderSteps .order-summary {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 20px 0 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* Your Items heading */
#orderSteps .order-summary>h3 {
    display: block;
    width: 100%;
    margin: 0 0 15px;
    font-size: 24px;
}

/* Products must be one below another */
#orderSteps .order-items {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100%;
    gap: 12px;
    box-sizing: border-box;
}

/* Individual product */
#orderSteps .order-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 15px;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    padding: 12px;
    margin: 0;
    box-sizing: border-box;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

/* Product image */
#orderSteps .order-item img {
    display: block;
    flex: 0 0 90px;
    width: 90px !important;
    height: 90px !important;
    max-width: 90px !important;
    max-height: 90px !important;
    object-fit: cover;
    border-radius: 10px;
}

/* Product details */
#orderSteps .order-item-info {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

/* Prevent one-letter product name */
#orderSteps .order-item-info h4 {
    display: block;
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.4;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere;
}

#orderSteps .order-item-info p {
    margin: 4px 0;
    font-size: 14px;
    white-space: normal;
    overflow-wrap: break-word;
}

/* Product total */
#orderSteps .order-item>strong {
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
    font-size: 16px;
}

/* Price summary must stay below products */
#orderSteps .price-summary {
    display: block !important;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    margin-top: 20px;
    padding: 18px;
    box-sizing: border-box;
    border-radius: 12px;
    overflow: hidden;
}

/* Summary rows */
#orderSteps .price-summary .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* Buttons below summary */
#orderSteps .order-actions {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 12px;
    width: 100% !important;
    max-width: 100%;
    margin-top: 20px;
    box-sizing: border-box;
}

/* Both buttons */
#orderSteps .order-actions button {
    flex: 1 1 200px;
    width: auto;
    max-width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    box-sizing: border-box;
    white-space: normal;
}

/* =====================================================
   TABLET
===================================================== */
@media (max-width: 1024px) {
    #orderSteps .order-container {
        padding: 12px;
    }

    #orderSteps .order-item {
        gap: 12px;
    }

    #orderSteps .order-item img {
        flex-basis: 80px;
        width: 80px !important;
        height: 80px !important;
        max-width: 80px !important;
        max-height: 80px !important;
    }

    #orderSteps .order-actions button {
        flex: 1 1 180px;
    }
}

/* =====================================================
   MOBILE
===================================================== */
@media (max-width: 600px) {
    #orderSteps .order-container {
        padding: 10px;
    }

    #orderSteps .order-header {
        display: block;
    }

    #orderSteps .checkout-steps {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 10px;
        font-size: 13px;
    }

    #orderSteps .order-summary>h3 {
        font-size: 22px;
    }

    #orderSteps .order-item {
        display: grid !important;
        grid-template-columns: 75px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        padding: 10px;
    }

    #orderSteps .order-item img {
        width: 75px !important;
        height: 75px !important;
        max-width: 75px !important;
        max-height: 75px !important;
    }

    #orderSteps .order-item-info h4 {
        font-size: 14px;
    }

    #orderSteps .order-item-info p {
        font-size: 13px;
    }

    #orderSteps .order-item>strong {
        grid-column: 2;
        justify-self: start;
        margin-left: 0;
        font-size: 14px;
    }

    #orderSteps .price-summary {
        padding: 15px;
    }

    #orderSteps .order-actions {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    #orderSteps .order-actions button {
        flex: none;
        width: 100% !important;
        min-height: 48px;
    }
}

/* =========================================================
   RESPONSIVE FIX - LAPTOP, TABLET AND MOBILE
========================================================= */
/* Prevent horizontal overflow */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

/* Keep page content visible above bottom navigation */
.main-content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding-bottom: 0;
}

.page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

/* =========================================================
   TABLET AND MOBILE HEADER
========================================================= */
@media (max-width: 1024px) {
    .header {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }

    .nav-container {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        padding: 12px;
    }

    .logo-section {
        flex: 1 1 180px;
        min-width: 0;
    }

    .logo-section img {
        max-width: 100px;
        height: auto;
    }

    .logo-text {
        font-size: 22px;
        line-height: 1;
    }

    .nav-actions {
        display: flex;
        flex: 1 1 100%;
        width: 100%;
        gap: 8px;
        order: 2;
    }

    .nav-actions .nav-btn {
        flex: 1;
        min-width: 0;
        text-align: center;
        padding: 12px 6px;
        white-space: normal;
    }

    .nav-label {
        overflow-wrap: break-word;
    }

    .search-bar {
        display: flex;
        flex: 1 1 100%;
        width: 100%;
        order: 3;
        min-width: 0;
    }

    .search-bar input {
        min-width: 0;
        width: 100%;
    }

    .panel {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: visible;
        white-space: nowrap;
    }

    .panel>* {
        flex-shrink: 0;
    }

    .mobile-menu-btn {
        display: none;
    }

    /* Cart page */
    #cartPage .container {
        width: 100%;
        max-width: 100%;
        padding: 12px;
    }

    #cartItems {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .cart-item {
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: minmax(90px, 130px) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 12px;
        overflow: hidden;
    }

    .cart-item img {
        width: 100%;
        max-width: 130px;
        height: 130px;
        object-fit: cover;
        border-radius: 12px;
    }

    .cart-item-details {
        min-width: 0;
        width: 100%;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .cart-item-details h3 {
        width: 100%;
        margin: 0 0 8px;
        font-size: 18px;
        line-height: 1.3;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .cart-item-details p,
    .cart-item-details span {
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .cart-item>.btn-secondary {
        grid-column: 1 / -1;
        width: 100%;
    }

    .quantity-controls {
        display: flex;
        align-items: center;
        gap: 6px;
        max-width: 100%;
    }

    .quantity-input {
        width: 55px;
        min-width: 0;
    }

    /* Cart summary */
    #cartSummary {
        width: 100%;
        max-width: 100%;
        margin-top: 15px;
        padding: 18px;
        overflow: hidden;
    }

    .summary-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    #cartSummary .btn-primary {
        width: 100% !important;
        min-height: 65px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    /* Order page */
    #orderPage .container,
    #ordersPage .container {
        width: 100%;
        max-width: 100%;
        padding: 12px;
    }

    #orderPage h1,
    #ordersPage h1 {
        font-size: 32px;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    /* Order cards */
    .order-card {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        padding: 18px;
    }

    .order-card * {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    /* Product grids */
    .product-grid {
        width: 100%;
        max-width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-card {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .product-card img {
        max-width: 100%;
        height: auto;
        object-fit: cover;
    }
}

/* =========================================================
   MOBILE SCREEN
========================================================= */
@media (max-width: 600px) {
    .nav-container {
        padding: 8px;
        gap: 8px;
    }

    .logo-section {
        flex: 1 1 100%;
        justify-content: center;
    }

    .logo-section img {
        max-width: 85px;
    }

    .logo-text {
        font-size: 20px;
    }

    .nav-actions {
        gap: 5px;
    }

    .nav-actions .nav-btn {
        font-size: 14px;
        min-height: 65px;
        padding: 8px 3px;
    }

    .nav-icon {
        display: block;
        font-size: 18px;
    }

    .nav-label {
        font-size: 14px;
    }

    .search-bar {
        width: 100%;
    }

    .search-bar input {
        font-size: 16px;
    }

    .search-bar button {
        padding: 0 16px;
    }

    .panel {
        min-height: 68px;
    }

    .panel a,
    .dropdown-btn {
        font-size: 14px;
    }

    /* Cart mobile layout */
    .cart-item {
        grid-template-columns: 95px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .cart-item img {
        width: 95px;
        height: 110px;
    }

    .cart-item-details h3 {
        font-size: 16px;
    }

    .cart-item-details {
        font-size: 14px;
    }

    #cartSummary {
        padding: 15px;
    }

    .summary-row {
        font-size: 16px;
        align-items: flex-start;
    }

    #cartSummary .summary-total {
        font-size: 20px;
        font-weight: 700;
    }

    #cartSummary .btn-primary {
        font-size: 18px;
        padding: 18px 10px;
    }

    /* Product cards mobile */
    .product-grid {
        grid-template-columns: 1fr;
    }

    /* Orders mobile */
    .order-card {
        padding: 15px;
        border-radius: 18px;
    }

    .order-card h3 {
        font-size: 18px;
    }

    /* Prevent large headings from overflowing */
    h1,
    h2,
    h3 {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    /* Give content space above fixed bottom nav */
    .main-content {
        padding-bottom: 125px;
    }
}

/* =========================================================
   BOTTOM NAVIGATION
========================================================= */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    width: 100%;
    max-width: 100%;
    min-height: 85px;
    padding: 8px 5px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: center;
    background: #ffffff;
    border-top: 1px solid #dddddd;
    box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.12);
}

.bottom-nav-item {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    text-align: center;
    color: #512238;
    font-size: 14px;
    font-weight: 600;
    padding: 5px 2px;
}

.bottom-nav-icon {
    font-size: 24px;
    line-height: 1.2;
}

.bottom-cart-count {
    position: absolute;
    top: -2px;
    right: 18%;
    min-width: 24px;
    height: 24px;
    padding: 2px 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: #e83f78;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

@media (min-width: 1025px) {
    .bottom-nav {
        display: none;
    }
}

/* =========================================================
DYNAMIC CONTENT SPACING
========================================================= */
@media screen and (max-width: 1024px) {
    .page {
        padding-bottom: var(--bottom-nav-height) !important;
        position: relative;
        z-index: 1;
    }

    .main-content {
        padding-top: 0 !important;
        padding-bottom: 10px !important;
        min-height: calc( 50vh - var(--header-height) - var(--bottom-nav-height) );
    }

    .bottom-nav {
        z-index: 9999;
    }

    .header {
        z-index: 10000;
    }

    /* Home page spacing */
    #homePage .hero-section,
    #homePage .hero-slider,
    #homePage .banner-section {
        margin-top: 0 !important;
    }
}

@media screen and (max-width: 600px) {
    .page {
        padding-bottom: var(--bottom-nav-height) !important;
    }

    .main-content {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* =========================================================
HOMEPAGE CATEGORY / RELATIONSHIP / FESTIVAL CONTAINERS
========================================================= */
#relationshipGrid,
#corporateGiftingGrid,
#festivalGrid,
#categoryGrid {
    display: block !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* =========================================================
PINNED CARDS - FIRST ROW
========================================================= */
.pinned-shop-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto 25px;
    box-sizing: border-box;
}

.pinned-shop-grid .shop-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* =========================================================
AUTO SLIDER - SECOND ROW
========================================================= */
.shop-slider-wrapper {
    position: relative;
    clear: both;
    margin: 0 auto;

    -webkit-mask-image: linear-gradient( to right, transparent, #000 4%, #000 96%, transparent );

    mask-image: linear-gradient( to right, transparent, #000 4%, #000 96%, transparent );
}

.shop-slider-track {
    width: max-content;
    gap: 24px;

    animation: shopAutoSlide 45s linear infinite;
}

@media (hover: hover) and (pointer: fine) {
    .shop-slider-track:hover {
        animation-play-state: paused;
    }
}

.shop-slider-track .shop-card {
    flex: 0 0 220px !important;
    width: 220px !important;
    min-width: 220px !important;
}

/* =========================================================
SHARED CARD DESIGN
========================================================= */
.shop-card {
    background: #fff;
    border: 1px solid rgba(227, 84, 134, 0.12);
    border-radius: 18px;
    overflow: hidden;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shop-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 14px 35px rgba(227, 84, 134, 0.18);
}

.shop-card img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.shop-card .category-card-content {
    padding: 18px;
    min-height: 112px;
}

.shop-card .category-card-content h3 {
    margin: 0 0 8px;
    color: #292929;
    font-size: 18px;
    font-weight: 700;
}

.shop-card .category-card-content p {
    margin: 0;
    color: #777;
    font-size: 13px;
    line-height: 1.5;
}

.shop-card .category-btn {
    display: block;
    margin: 0 18px 18px;
    padding: 11px 14px;

    text-align: center;
    text-decoration: none;

    background: linear-gradient(135deg, #e35486, #c9366d);
    color: #fff;
    border-radius: 10px;

    font-size: 13px;
    font-weight: 600;

    transition: opacity 0.3s ease;
}

.shop-card .category-btn:hover {
    opacity: 0.88;
}

.empty-shop-message {
    width: 100%;
    padding: 30px;
    text-align: center;
    color: #777;
}

/* =========================================================
CONTINUOUS SLIDER ANIMATION
========================================================= */
@keyframes shopAutoSlide {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(calc(-50% - var(--slider-half-gap, 12px)), 0, 0);
    }
}

/* =========================================================
TABLET
========================================================= */
@media (min-width: 651px) and (max-width: 992px) {
    .pinned-shop-grid {
        gap: 14px;
    }

    .shop-card img {
        height: 150px;
    }

    .shop-card .category-card-content {
        padding: 12px;
    }

    .shop-card .category-card-content h3 {
        font-size: 15px;
    }

    .shop-card .category-card-content p {
        font-size: 12px;
    }

    .shop-card .category-btn {
        margin: 0 12px 12px;
        padding: 9px 8px;
        font-size: 11px;
    }
}

/* =========================================================
MOBILE - FOUR PINNED CARDS + SAME SLIDER SPEED
========================================================= */
@media (max-width: 650px) {
    .pinned-shop-grid .shop-card {
        border-radius: 8px;
    }

    .pinned-shop-grid .shop-card img {
        height: 85px;
    }

    .pinned-shop-grid .shop-card h3 {
        font-size: 10px;
        line-height: 1.2;
        text-align: center;
        overflow-wrap: anywhere;
    }

    .pinned-shop-grid .shop-card p {
        font-size: 9px;
    }

    .pinned-shop-grid .shop-card button,
    .pinned-shop-grid .shop-card a {
        padding: 5px 2px;
        font-size: 9px;
    }

    .shop-slider-track {
        animation-duration: 45s;
    }

    .shop-slider-track .shop-card {
        flex: 0 0 150px !important;
        width: 150px !important;
        min-width: 150px !important;
    }

    .shop-slider-track .shop-card img {
        height: 145px;
    }

    .shop-card .category-card-content {
        padding: 12px;
    }

    .shop-card .category-card-content h3 {
        font-size: 13px;
    }

    .shop-card .category-card-content p {
        font-size: 11px;
    }

    .shop-card .category-btn {
        margin: 0 12px 12px;
        padding: 8px;
        font-size: 11px;
    }
}

/* =========================================================
VERY SMALL MOBILE SCREENS
========================================================= */
@media (max-width: 380px) {
    .pinned-shop-grid .shop-card img {
        height: 60px;
    }

    .pinned-shop-grid .shop-card h3 {
        font-size: 8px;
    }

    .pinned-shop-grid .shop-card p {
        font-size: 9px;
    }

    .pinned-shop-grid .shop-card button,
    .pinned-shop-grid .shop-card a {
        padding: 4px 2px;
        font-size: 8px;
    }
}



/* RISHTABOX - CHECKOUT SELLING PRICE / MRP */
.checkout-item-price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 8px 0;
}

.checkout-item-price .current-price {
    color: #4a2635;
    font-weight: 800;
}

.checkout-item-price .original-price {
    color: #888;
    font-size: 13px;
    text-decoration: line-through;
}

.checkout-item-price .discount {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 5px;
    background: #f3e1e7;
    color: #8b405c;
    font-size: 11px;
    font-weight: 750;
}
