@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&family=Almarai:wght@400;700&display=swap');

:root {
    --primary-color: #e02d00;
    /* Nuts Green (#7BB32E) */
    --secondary-color: #3D2B1F;
    /* Dark Cocoa */
    --background-cream: #FFFFFF;
    /* White Background as requested */
    --text-dark: #2D2D2D;
    --text-muted: #6B7280;
    --accent-red: #ef4444;
    --accent-yellow: #FFD441;
    /* Nuts Yellow */
    --border-light: #f3f4f6;
    --white: #ffffff;
    --header-font: 'Cairo', sans-serif;
    --body-font: 'Almarai', sans-serif;
    --container-max: 1200px;

    /* Product Card Variables for easy global updates */
    --card-title-size: 1.05rem;
    --card-price-size: 1.25rem;
    --card-padding: 20px;
    --card-gap: 8px;
    --btn-padding: 8px 12px;
    --btn-font-size: 0.9rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--background-cream);
    color: var(--text-dark);
    font-family: var(--body-font);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--header-font);
    font-weight: 700;
}

/* --- Sticky Wrapper --- */
.nd-sticky-wrapper {
    position: sticky;
    top: 0;
    z-index: 1100; /* High enough to stay above content */
    width: 100%;
}

/* --- Top Bar --- */
.nd-topbar {
    background-color: var(--secondary-color);
    color: var(--white);
    text-align: center;
    padding: 10px 0;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* --- Header --- */
.nd-header {
    background-color: var(--white);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.nd-header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}


.nd-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}


.nd-logo img {
    height: 60px;
}

.nd-search-wrap {
    flex-grow: 1;
    max-width: 600px;
    position: relative;
}

.nd-search-form {
    display: flex;
}

.nd-search-input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid var(--border-light);
    border-radius: 50px 0 0 50px;
    /* RTL Note: Rounded on the left */
    outline: none;
    font-family: var(--body-font);
    font-size: 1rem;
    transition: border-color 0.3s;
}

/* Flip rounding for RTL */
[dir="rtl"] .nd-search-input {
    border-radius: 0 50px 50px 0;
}

.nd-search-input:focus {
    border-color: var(--primary-color);
}

.nd-search-btn {
    background-color: var(--primary-color);
    border: none;
    padding: 0 25px;
    border-radius: 50px 0 0 50px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--white);
    transition: background-color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nd-search-btn span {
    margin-right: 8px;
    font-weight: 700;
}

[dir="rtl"] .nd-search-btn {
    border-radius: 50px 0 0 50px;
}

.nd-search-btn:hover {
    background-color: #efc533;
}

.nd-header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nd-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 0.85rem;
    gap: 4px;
    transition: color 0.3s;
}

.nd-icon-btn:hover {
    color: var(--primary-color);
}

.nd-icon-link {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 0.85rem;
    gap: 4px;
    transition: color 0.3s;
    position: relative;
}

.nd-icon-link:hover {
    color: var(--primary-color);
}

.nd-icon-link i {
    font-size: 1.3rem;
}

/* --- Footer --- */
.nd-footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 80px 20px 40px;
    margin-top: 60px;
}

.nd-footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.nd-footer-col h4 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 10px;
}

.nd-footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
}

.nd-footer-col ul {
    list-style: none;
}

.nd-footer-col ul li {
    margin-bottom: 12px;
}

.nd-footer-col ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nd-footer-col ul li a:hover {
    color: var(--primary-color);
}

.nd-footer-brand p {
    font-size: 0.95rem;
    color: #d1d5db;
    margin-top: 20px;
}

.nd-footer-social {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.nd-footer-social a {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.nd-footer-social a:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.nd-footer-bottom {
    max-width: var(--container-max);
    margin: 60px auto 0;
    padding: 30px 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.85rem;
    color: #9ca3af;
}

.nd-footer-bottom a {
    color: #9ca3af;
    text-decoration: none;
}

.nd-footer-bottom a:hover {
    color: var(--white);
}

@media (max-width: 768px) {
    .nd-footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .nd-footer-col h4::after {
        right: 50%;
        transform: translateX(50%);
    }

    .nd-footer-social {
        justify-content: center;
    }
}

.nd-icon-btn i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.nd-cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: var(--accent-red);
    color: var(--white);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 700;
}

/* --- Navigation --- */
.nd-nav {
    background-color: var(--white);
    border-top: 1px solid var(--border-light);
    padding: 10px 0;
}

.nd-nav-links {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 40px;
}

.nd-nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-family: var(--header-font);
    font-weight: 700;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nd-nav-link:hover {
    color: var(--primary-color);
}

/* --- Hero Section --- */
.nd-hero {
    padding: 60px 20px;
    background: radial-gradient(circle, #fdf6e6 0%, #f9f4ee 100%);
    text-align: center;
}

.nd-hero-title {
    font-size: 3.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.1;
}

.nd-hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 40px;
}

.nd-hero-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    padding: 15px 50px;
    border-radius: 50px;
    font-family: var(--header-font);
    font-weight: 900;
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(255, 212, 65, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.nd-hero-btn:hover {
    transform: scale(1.05);
}

/* --- Category Grid --- */
.nd-section-title {
    text-align: center;
    margin: 60px 0 40px;
    font-size: 2.8rem;
    color: var(--secondary-color);
    font-weight: 900;
    position: relative;
}

.nd-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.nd-grid {
    max-width: var(--container-max);
    margin: 0 auto 60px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 products on large desktop as requested */
    gap: 25px;
    padding: 0 20px;
}

@media (max-width: 1200px) {
    .nd-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .nd-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .nd-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 10px;
    }

    .nd-card {
        padding: 12px !important;
        border-radius: 16px !important;
    }

    .nd-card-img-wrap {
        height: 160px !important;
    }

    .nd-card-title {
        font-size: 1rem !important;
    }

    .nd-card-price {
        font-size: 1.1rem !important;
    }

    .nd-add-btn {
        padding: 8px 10px !important;
        font-size: 0.8rem !important;
    }
}

@media (max-width: 640px) {
    .nd-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
        padding: 0 10px;
    }

    .nd-card {
        padding: 15px;
    }

    .nd-card-img {
        width: 100%;
        height: 150px;
    }

    .nd-card-title {
        font-size: 1.1rem;
    }
}

.nd-card,
.sw-card,
.ebay-product-card {
    background-color: var(--white);
    border-radius: 28px;
    padding: var(--card-padding);
    text-align: right;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    cursor: pointer;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: var(--card-gap);
    position: relative;
    overflow: hidden;
    height: 100%;
    /* Fill grid cell */
}

.nd-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.nd-card-img-wrap {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 5px;
    position: relative;
    background: #fdfdfd;
    border-radius: 18px;
}

.nd-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* As requested: fill the container */
    transition: transform 0.5s ease;
    padding: 10px;
}

.nd-card:hover .nd-card-img {
    transform: scale(1.1);
}

/* New Layout: Button ABOVE Name */
.nd-add-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: var(--btn-padding);
    border-radius: 50px;
    /* Pill shape */
    font-family: var(--header-font);
    font-weight: 800;
    font-size: var(--btn-font-size);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nd-add-btn:hover {
    background-color: #464941;
    /* Darker green */
    transform: scale(1.02);
}

.nd-add-btn.is-added {
    background-color: var(--secondary-color);
}

.nd-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    /* Take up remaining space */
}

.nd-card-title {
    font-size: var(--card-title-size);
    color: var(--secondary-color);
    margin: 0;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Limit to 2 lines */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em;
    /* reserve space for exactly 2 lines (1.4 * 2) */
}

.nd-card-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #f59e0b;
    /* Star color */
    font-size: 0.85rem;
}

.nd-card-rating .count {
    color: var(--text-muted);
}

.nd-card-price {
    font-weight: 900;
    color: var(--text-dark);
    font-size: var(--card-price-size);
    margin: 4px 0;
}

/* Extra Info Labels */
.nd-promo-tag {
    background-color: var(--accent-yellow);
    color: var(--secondary-color);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-block;
    align-self: flex-start;
}

.nd-delivery-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
}

.nd-delivery-info i {
    font-size: 0.9rem;
}

.nd-card-weight {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nd-topbar-inner {
        padding: 0 15px;
    }

    .nd-topbar-msg {
        font-size: 0.85rem;
    }

    .nd-header {
        padding: 10px 0;
    }

    .nd-header-inner {
        flex-direction: row;
        /* Keep logo and hamburger on same row if needed, but let's refine in header.php */
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 15px;
    }

    .nd-logo img {
        height: 45px;
    }

    .nd-search-wrap {
        width: 100%;
        order: 3;
    }

    .nd-header-icons {
        order: 2;
        gap: 10px;
    }

    .nd-nav {
        display: none;
        /* Hide desktop nav on mobile/tablet */
    }

    .nd-hero {
        padding: 40px 15px;
    }

    .nd-hero-title {
        font-size: 2.2rem;
    }

    .nd-hero-subtitle {
        font-size: 1.1rem;
    }

    .nd-section-title {
        font-size: 2rem;
        margin: 40px 0 25px;
    }
}

/* Specific Mobile Navbar Refining */
.nd-mob-icon-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--secondary-color);
    font-family: var(--body-font);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
    padding: 5px;
    min-width: 50px;
}

.nd-mob-icon-btn i {
    font-size: 1.2rem;
}

.nd-mob-icon-btn:active {
    transform: scale(0.95);
    color: var(--primary-color);
}

.nd-mob-icon-btn .nd-cart-badge {
    top: 0;
    right: 5px;
}

/* Sticky Header Scrolled state */
.nd-header.scrolled {
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* --- Cart Drawer (Nuts-Premium Styled) --- */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(61, 43, 31, 0.4);
    /* Dark Cocoa Overlay */
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 2000;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pb-cart-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 420px;
    max-width: 90%;
    height: 100%;
    background: var(--white);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.pb-cart-drawer.active {
    transform: translateX(0);
}

/* Header */
.drawer-header {
    padding: 24px;
    background: var(--secondary-color);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.drawer-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 900;
}

#close-cart-drawer {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#close-cart-drawer:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Body */
.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #fafbfc;
}

.drawer-item {
    background: var(--white);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

.drawer-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.06);
}

.item-img {
    flex-shrink: 0;
}

.item-img img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--background-cream);
}

.item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-details h4 {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 4px;
    line-height: 1.4;
}

.item-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.item-qty-control {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.qty-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.qty-val {
    font-weight: 700;
    font-size: 1rem;
    min-width: 20px;
    text-align: center;
}

.remove-item {
    background: none;
    border: none;
    color: #d1d5db;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
    align-self: flex-start;
}

.remove-item:hover {
    color: var(--accent-red);
}

/* Footer */
.drawer-footer {
    padding: 24px;
    background: var(--white);
    border-top: 2px solid var(--border-light);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.03);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.total-row span:first-child {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.total-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--secondary-color);
}

.checkout-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    padding: 16px;
    border-radius: 50px;
    font-family: var(--header-font);
    font-weight: 900;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 212, 65, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.checkout-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 212, 65, 0.4);
}

/* Empty State */
.empty-cart-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted);
    gap: 20px;
    padding: 40px;
}

.empty-cart-msg i {
    font-size: 4rem;
    color: var(--border-light);
}

.empty-cart-msg p {
    font-size: 1.2rem;
    font-weight: 600;
}

.browse-btn {
    background: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    margin-top: 10px;
}

/* --- Dynamic Circular Categories Strip --- */
.nd-cat-strip-section {
    padding: 30px 0;
    background-color: var(--white);
    overflow: hidden;
    position: relative;
    border-bottom: 2px solid var(--border-light);
}

.nd-cat-strip-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 30px;
    padding: 20px 0;
    justify-items: center;
}

.nd-cat-item {
    text-align: center;
    text-decoration: none;
    width: 100%;
    transition: transform 0.3s ease;
}

.nd-cat-item:hover {
    transform: translateY(-5px);
}

.nd-cat-circle {
    width: 120px;
    height: 120px;
    background-color: #d6d1a5;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.nd-cat-circle img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.nd-cat-item:hover .nd-cat-circle img {
    transform: scale(1.1);
}

.nd-cat-label {
    display: block;
    font-family: var(--header-font);
    font-weight: 800;
    color: var(--secondary-color);
    font-size: 0.95rem;
    line-height: 1.2;
}

@media (max-width: 1024px) {
    .nd-cat-strip-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .nd-cat-strip-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .nd-cat-circle {
        width: 80px;
        height: 80px;
    }

    .nd-cat-label {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .nd-cat-strip-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Nuts.com Inspired Super Categories (3x3 Grid) --- */
.nd-super-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.nd-super-card {
    background-color: #F9F4EE;
    /* Nuts-inspired peach/cream */
    border-radius: 12px;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    min-height: 140px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.nd-super-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: #e5dfd4;
}

.nd-super-info {
    flex: 1;
    padding-left: 20px;
    /* Space for image in RTL */
}

.nd-super-title {
    font-family: var(--header-font);
    font-size: 1.25rem;
    color: var(--secondary-color);
    font-weight: 800;
    margin-bottom: 4px;
}

.nd-super-subtitle {
    font-family: var(--body-font);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.nd-super-img-wrap {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nd-super-img-wrap img {
    max-width: 110%;
    max-height: 110%;
    object-fit: contain;
}

@media (max-width: 1024px) {
    .nd-super-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .nd-super-grid {
        grid-template-columns: 1fr;
    }

    .nd-super-card {
        padding: 15px 20px;
        min-height: 110px;
    }

    .nd-super-title {
        font-size: 1.1rem;
    }
}

/* --- Nuts.com Inspired Header Redesign --- */

/* Top Bar */
.nd-topbar {
    background-color: #111;
    /* Desktop default */
    color: #fff;
    font-size: 0.85rem;
    padding: 8px 0;
    text-align: center;
    font-weight: 600;
}

.nd-topbar-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nd-topbar-links {
    display: flex;
    gap: 20px;
}

.nd-topbar-link {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.nd-topbar-link:hover {
    opacity: 0.8;
}

/* Main Header */
.nd-header {
    background: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
}

.nd-header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 200px 1fr 280px;
    align-items: center;
    gap: 40px;
}

/* Search Bar Redesign */
.nd-search-wrap {
    width: 100%;
}

.nd-search-form {
    display: flex;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50px;
    overflow: hidden;
    height: 48px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nd-search-input {
    flex: 1;
    border: none;
    padding: 0 25px;
    font-size: 0.95rem;
    outline: none;
}

.nd-search-btn {
    background: var(--accent-yellow);
    border: none;
    padding: 0 25px;
    color: var(--secondary-color);
    font-weight: 900;
    font-family: var(--header-font);
    cursor: pointer;
    transition: background 0.2s;
    border-right: 1px solid #ccc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nd-search-btn:hover {
    background: #fcc331;
}

/* Header Icons (Sign, Reorder, Cart) */
.nd-header-icons {
    display: flex;
    justify-content: flex-end;
    gap: 25px;
}

.nd-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: color 0.2s;
}

.nd-icon-link i {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.nd-icon-link:hover {
    color: var(--primary-color);
}

.nd-cart-trigger {
    position: relative;
    cursor: pointer;
}

.nd-cart-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--primary-color);
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid white;
}

/* Nav Bar */
.nd-nav {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.nd-nav-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    list-style: none;
}

.nd-nav-link {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 0.95rem;
}

.nd-nav-link:hover {
    color: var(--primary-color);
}

/* Mobile Header Overrides */
@media (max-width: 991px) {
    .nd-topbar {
        background-color: #111;
        color: #fff;
        font-weight: 600;
    }

    .nd-topbar-links {
        display: none;
    }

    .nd-header-inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
    }

    .nd-logo {
        order: 1;
        display: flex;
        justify-content: flex-start;
    }

    .nd-logo img {
        height: 40px;
    }

    .nd-header-icons {
        order: 2;
        display: flex;
        justify-content: flex-end;
    }

    .nd-search-wrap,
    .nd-nav {
        display: none;
        /* Mobile uses search icon trigger */
    }

    .nd-mob-icon-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        background: none;
        border: none;
        color: var(--secondary-color);
        font-size: 0.65rem;
        font-weight: 800;
        cursor: pointer;
    }

    .nd-mob-icon-btn i {
        font-size: 1.2rem;
        margin-bottom: 2px;
    }
}

/* Visibility Helpers */
.desktop-only {
    display: contents !important;
}

.mobile-only {
    display: none !important;
}

@media (max-width: 991px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: contents !important;
    }
}

/* Mobile Menu & Search Dropdowns */
.sw-mob-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2100; /* Above sticky header (1100) and cart drawer if needed, though they are usually separate */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sw-mob-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sw-mob-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: #fff;
    z-index: 2200; /* Higher than overlay */
    transition: all 0.3s ease;
    padding: 20px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.sw-mob-nav.active {
    right: 0;
}

.mob-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.mob-nav-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--secondary-color);
}

#sw-mob-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

.mob-nav-list {
    list-style: none;
}

.mob-nav-list li {
    margin-bottom: 20px;
}

.mob-nav-list a {
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 700;
}

/* Mobile Search Dropdown */
.nd-mob-search-bar {
    display: none;
    /* Controlled by JS toggle */
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.nd-mob-search-bar.active {
    display: block !important;
}

@media (max-width: 991px) {
    .nd-header-inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nd-logo {
        position: static !important;
        transform: none !important;
        left: auto !important;
    }

    .nd-header-icons {
        width: auto !important;
    }
}

/* Fix: Ensure mobile search bar is hidden on desktop even if toggled active */
@media (min-width: 992px) {
    .nd-mob-search-bar {
        display: none !important;
    }
}

/* ===============================================================
   WHATSAPP FLOATING BUTTON (Modern Redesign)
   =============================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    /* Floating on the left side */
    background: #25D366;
    /* Vibrant WhatsApp Green */
    color: #fff !important;
    border: none !important;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 800;
    display: none;
    /* Controlled by app.js visibility logic */
    align-items: center;
    gap: 10px;
    cursor: pointer;
    z-index: 1010;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--header-font);
    text-decoration: none !important;
}

/* Force showing for testing or if manually added class */
.whatsapp-float.show {
    display: flex !important;
    animation: sw-pop-in 0.4s ease;
}

.whatsapp-float:hover {
    background: #1ebe5d !important;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4);
    color: #fff !important;
}

.whatsapp-float i {
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.whatsapp-float .selected-count {
    background: #e02d00;
    /* Matching our primary red icon style */
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    margin-right: -4px;
}

@keyframes sw-pop-in {
    from {
        transform: translateY(40px) scale(0.5);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 16px;
        left: 16px;
        padding: 10px 18px;
        font-size: 0.85rem;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    }
}