:root {
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

body {
    margin: auto;
    background: #F5F1EC;
    font-family: var(--font-body);
}

body.menu-open {
    overflow: hidden;
}

/* ===== HEADER ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    color: #333;
    box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #f5f1ec;
}

.logo-wrapper {
    overflow: hidden;
}

nav {
    text-align: center;
    padding: 1%;
    position: relative;
    left: -6%;
}

#rb-logo {
    height: 80px;
}

#rb-text-logo {
    height: 30px;
    margin-bottom: 24px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 400;
    font-size: 1.2rem;
    transition: 0.1s ease-in-out;
    background: #F5F1EC;
}

nav ul li a:hover {
    color: #C2A26C;
    transition: 0.1s ease-in-out;
    scale: 1.1;
}

nav ul li a.active {
    color: #C2A26C;
    border-bottom: #C2A26C 2px dashed;
    padding-bottom: 30%;
}

/* ===== HEADER ICONS ===== */
.header-icons {
    display: flex;
    gap: 20px;
    font-weight: 100;
    font-size: 1.6rem;
}

.header-icons i {
    cursor: pointer;
    transition: 0.1s ease-in-out;
}

.header-icons i:hover {
    color: #C2A26C;
    transition: 0.1s ease-in-out;
    scale: 1.2;
}

.icon-wrapper {
    position: relative;
    font-size: 1.4rem;
    cursor: pointer;
}

#cart-icon a {
    color: #333;
}

#fav-icon a {
    color: #333;
}

.dot {
    position: absolute;
    top: -3px;
    right: -6px;
    width: 8px;
    height: 8px;
    background-color: red;
    border-radius: 50%;
    border: 2px solid white;
    animation: pop 0.2s ease;
    display: none;
}

@keyframes pop {
    0% { transform: scale(0.5); }
    100% { transform: scale(1); }
}

/* ===== HAMBURGER ===== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Animate to X */
.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== MOBILE NAV OVERLAY ===== */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mobile-nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav {
    position: absolute;
    top: 0;
    right: 0;
    width: 75%;
    max-width: 320px;
    height: 100%;
    background: #F5F1EC;
    padding: 100px 40px 40px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.mobile-nav-overlay.open .mobile-nav {
    transform: translateX(0);
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.mobile-nav ul li a {
    text-decoration: none;
    color: #333;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    transition: color 0.2s ease;
    display: block;
}

.mobile-nav ul li a.active,
.mobile-nav ul li a:hover {
    color: #C2A26C;
}

.mobile-nav-icons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px dashed #C2A26C;
    padding-top: 24px;
}

.mobile-nav-icons a {
    text-decoration: none;
    color: #333;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s;
}

.mobile-nav-icons a:hover {
    color: #C2A26C;
}

/* ===== HERO ===== */
.hero {
    text-align: center;
    padding: 100px 20px;
    background-size: cover;
    background-position: center;
    color: #fefe;
    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.3) 50%,
            rgba(0, 0, 0, 0.05) 100%
        ),
        url("./Images/RB Hero bg2.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    scale: 0.95;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-content p {
    margin-bottom: 30px;
}

.hero .btn {
    font-family: var(--font-ui);
    padding: 14px 32px;
    background-color: #64646400;
    color: #F5F1EC;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: transform 0.2s ease, background-color 0.2s ease;
    border: 2px dashed #C2A26C;
}

.hero .btn:hover {
    background-color: #C2A26C;
    transform: translateY(-2px);
}

/* ===== SHOP LAYOUT ===== */
.shop-layout {
    display: flex;
    gap: 1rem;
    position: relative;
}

.shop-layout::after {
    content: "";
    position: absolute;
    left: calc(515px + 15px);
    top: 0;
    width: 2px;
    height: 100%;
    background-color: #ccc;
}

/* Mobile filter toggle button */
.filter-toggle {
    display: none;
    width: calc(100% - 32px);
    margin: 16px auto 0;
    padding: 12px 20px;
    background: #F5F1EC;
    border: 2px dashed #C2A26C;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background 0.2s;
}

.filter-toggle:hover {
    background: #C2A26C;
    color: #F5F1EC;
}

/* ===== SIDEBAR ===== */
.sidebar-wrapper {
    display: flex;
    flex-direction: column;
    width: 26.4%;
    position: sticky;
    top: 14%;
    align-self: flex-start;
}

.sidebar {
    width: 80%;
    padding: 1rem;
    height: fit-content;
    box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
    color: #F5F1EC;
    margin-left: 9.5%;
    position: relative;
    overflow: hidden;
    background-color: #C2A26C;
}

#bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.sidebar-content {
    position: relative;
    z-index: 1;
    padding: 20px;
}

.sidebar h2 {
    margin-bottom: 1%;
}

#search-bar {
    padding: 2%;
    border: none;
    margin-right: 5%;
    width: 80%;
    outline: none;
    background: rgba(255, 255, 255, 0);
    border: 2px dashed #F5F1EC;
    color: #F5F1EC;
}

#search-bar::placeholder {
    color: #F5F1EC;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 7%;
    font-size: 1.1rem;
}

.fa-magnifying-glass {
    cursor: pointer;
    font-size: 1.1rem;
}

input[type="checkbox"] {
    accent-color: #C2A26C;
    color: #F5F1EC;
}

/* ===== SORT CONTAINER ===== */
.sort-container {
    width: 82%;
    margin-top: 10px;
    margin-left: 7.5%;
    padding: 20px;
    background: #F5F1EC;
    border: 2px solid #C2A26C;
    scale: 0.95;
}

.sort-container h2 {
    margin-top: -1%;
    padding-left: 5%;
}

#sort-products {
    width: 100%;
    padding: 20px;
    background: #F5F1EC;
    border: 2px dashed #C2A26C;
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
}

#sort-products:focus {
    outline: none;
    background: #C2A26C;
    color: #F5F1EC;
}

/* ===== PRODUCT CARDS ===== */
.shop-container {
    max-width: 68.3%;
    margin: 0 auto;
    margin-left: 1.5%;
    padding-left: 0.9%;
    height: auto;
    overflow: visible;
}

.card-group {
    display: flex;
    flex-wrap: wrap;
    gap: 23px;
    justify-content: center;
    overflow: hidden;
}

.card {
    background: #fff;
    overflow: hidden;
    box-shadow: rgba(14, 30, 37, 0.12) 0px 2px 4px 0px, rgba(14, 30, 37, 0.32) 0px 2px 16px 0px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    width: 300px;
    border: 2px solid #C2A26C;
}

.card h3 {
    border-bottom: #ccc 2px dashed;
    overflow: hidden;
    padding-bottom: 5%;
    width: 90%;
}

.card:hover {
    box-shadow: 0 18px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    scale: 0.98;
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    overflow: hidden;
}

.price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 16px 12px;
    margin-top: -5%;
}

.fav-icon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 16px 12px;
}

.fav-icon .fa-heart {
    padding-bottom: 5%;
    font-size: 1.2rem;
}

.fav-icon .fa-heart:hover {
    cursor: pointer;
    scale: 1.1;
}

.amount {
    font-size: 1.1rem;
    font-weight: 100;
    color: #222;
}

.add-btn {
    display: inline-block;
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    padding: 12px 0;
    background-color: #C2A26C;
    color: #F5F1EC;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-btn:hover {
    background-color: #A8875C;
}

/* ===== FOOTER ===== */
.footer-content {
    background-color: #f5f1ec;
    padding: 20px 40px;
    text-align: center;
    margin-top: 40px;
}

.social-icons a {
    margin-top: 10px;
    font-size: 1.7rem;
    color: #333;
}

.social-icons i {
    margin: 0 10px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.social-icons i:hover {
    color: #C2A26C;
    scale: 1.2;
}

.low-stock {
    color: red;
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 900;
    transition: transform 0.2s ease, background 0.2s ease;
}

.whatsapp-float:hover {
    background: #1ebe5d;
    transform: scale(1.1);
}

/* ===================================================
   RESPONSIVE BREAKPOINTS
   =================================================== */

/* ===== TABLET (≤ 1024px) ===== */
@media (max-width: 1024px) {
    header {
        scale: 1;
        padding: 16px 24px;
    }

    .hero {
        scale: 1;
        padding: 80px 20px;
    }

    .shop-layout::after {
        display: none;
    }

    .sidebar-wrapper {
        width: 30%;
    }

    .shop-container {
        max-width: none;
        width: 68%;
        margin-left: 0;
        padding-left: 0;
    }

    .card {
        width: 260px;
    }
}

/* ===== MOBILE (≤ 768px) ===== */
@media (max-width: 768px) {

    /* Header */
    header {
        padding: 14px 20px;
        scale: 1;
    }

    #rb-logo {
        height: 55px;
    }

    #rb-text-logo {
        height: 22px;
        margin-bottom: 18px;
    }

    /* Hide desktop nav, show hamburger */
    nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* Show mobile overlay when open */
    .mobile-nav-overlay {
        display: block;
    }

    /* Hide desktop header icons on small screens (shown in mobile nav instead) */
    .header-icons {
        display: none;
    }

    /* Hero */
    .hero {
        scale: 1;
        padding: 60px 16px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    /* Shop layout — stack vertically */
    .shop-layout {
        flex-direction: column;
    }

    .shop-layout::after {
        display: none;
    }

    /* Show filter toggle button */
    .filter-toggle {
        display: block;
    }

    /* Sidebar collapses by default on mobile */
    .sidebar-wrapper {
        display: none;
        width: 100%;
        position: static;
        padding: 0 16px;
        box-sizing: border-box;
    }

    /* Show when toggled */
    .sidebar-wrapper.sidebar-open {
        display: flex;
    }

    .sidebar {
        width: 100%;
        margin-left: 0;
        box-sizing: border-box;
    }

    .sort-container {
        width: 100%;
        margin-left: 0;
        box-sizing: border-box;
        scale: 1;
    }

    /* Products */
    .shop-container {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        padding: 0 16px;
        box-sizing: border-box;
    }

    .card-group {
        gap: 16px;
    }

    .card {
        width: 100%;
        max-width: 400px;
    }

    /* Footer */
    .footer-content {
        padding: 20px 16px;
    }
}

/* ===== SMALL MOBILE (≤ 480px) ===== */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .card {
        max-width: 100%;
    }

    #sort-products {
        font-size: 1rem;
        padding: 14px;
    }
}