/*
Theme Name: Knowzee WooCommerce
Theme URI:  https://example.com/knowzee
Author:      Knowzee
Description: WooCommerce theme using your Knowzee UI.
Version:     1.0.0
Text Domain: knowzee
*/

:root {
    --bg-color: #fcfbf9;
    /* Slightly off-white/cream for warmth */
    --text-main: #2b2b2b;
    /* Soft black */
    --text-muted: #6e6e6e;
    /* Muted gold */
    --accent-gold: #cfaa74;
    --border-color: #e5e5e5;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
    --spacing-unit: 1rem;
}

/* Mobile Specific Elements (Hidden by default on Desktop) */
.mobile-only {
    display: none;
}

.bottom-nav {
    display: none;
}

.mobile-search-wrapper {
    display: none;
}

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

.footer-search-mobile {
    display: none;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 80px;
    /* Above bottom nav */
    right: 20px;
    background-color: #25D366;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 99;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Mobile Menu Drawer */
.mobile-menu-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    /* Hidden left */
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    z-index: 200;
    transition: left 0.4s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu-drawer.open {
    left: 0;
}

.drawer-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.drawer-header h3 {
    font-size: 1.2rem;
    letter-spacing: 0.1em;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.mobile-nav-list li {
    border-bottom: 1px solid #f4f4f4;
    margin-bottom: 0;
}

.mobile-nav-list a {
    display: block;
    padding: 1rem 0;
    font-size: 1rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.grid {
    display: grid;
}

.text-center {
    text-align: center;
}

.uppercase {
    text-transform: uppercase;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--text-main);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--text-main);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: transparent;
    color: var(--text-main);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--text-main);
}

.btn-outline:hover {
    background-color: var(--text-main);
    color: #fff;
}

/* Make WooCommerce buttons match your .btn styles */
.woocommerce button.button,
.woocommerce a.button,
.woocommerce .single_add_to_cart_button {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 0;
}

.woocommerce .single_add_to_cart_button,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
    background-color: var(--text-main) !important;
    color: #fff !important;
    border: 1px solid var(--text-main) !important;
}

.woocommerce .single_add_to_cart_button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
    background-color: transparent !important;
    color: var(--text-main) !important;
}

.woocommerce .single_add_to_cart_button {
    width: 100% !important;
    max-width: 300px;
    display: inline-block;
}

.woocommerce .button.product_type_simple.btn-outline,
.woocommerce a.add_to_cart_button {
    background-color: transparent !important;
    color: var(--text-main) !important;
    border: 1px solid var(--text-main) !important;
}

/* Header */
header {
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    /* Ensure opaque background on scroll */
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

header.scrolled {
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Announcement Bar */
.announcement-bar {
    background-color: #000;
    color: #fff;
    padding: 0.5rem 0;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    overflow: hidden;
}

.marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 15s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Header Refinements */
header {
    padding: 1rem 0;
}

.nav-links a {
    font-size: 0.75rem;
    /* More minimal */
    font-weight: 500;
}

.header-icons {
    gap: 1.2rem;
    font-size: 1rem;
}

/* Hero Section */
.hero {
    height: 80vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 5rem;
    justify-content: center;
    text-align: center;
    background-image: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)), url('images/knowzee-banner.jpeg');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
    max-width: 600px;
    padding: 2rem;
    animation: fadeIn 1s ease-out;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Product Grid */
.products-section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3rem 2rem;
}

.product-image {
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
    aspect-ratio: 4/5;
    /* Portrait feel */
    background-color: #f4f4f4;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
    /* Subtle zoom */
}

.product-info {
    text-align: center;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.product-price {
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 500;
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    text-align: center;
}

.footer-links {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.copyright {
    font-size: 0.8rem;
    color: #999;
}

/* Cart Side Drawer (Hidden by default) */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 200;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.05);
    transition: right 0.4s ease;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

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

.cart-items {
    flex: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cart-item img {
    width: 80px;
    height: 100px;
    object-fit: cover;
}

.cart-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.cart-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #999;
    margin-top: 0.5rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block;
    }

    /* Header */
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        font-size: 1.2rem;
        cursor: pointer;
    }

    .logo {
        font-size: 1.5rem;
    }

    .mobile-search-wrapper {
        display: block !important;
    }

    header .container {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    /* Hero */
    .hero {
        height: 60vh;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    /* Product Grid - 2 Column */
    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .product-image {
        aspect-ratio: 3/4;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .products-section {
        padding: 2rem 0;
    }

    /* Footer */
    footer {
        padding: 2rem 0;
        margin-top: 2rem;
        text-align: left;
    }

    .footer-search-mobile {
        display: block;
        margin-bottom: 2rem;
    }

    .footer-grid {
        display: block !important;
        gap: 0;
    }

    .footer-accordion-item {
        border-bottom: 1px solid #eee;
    }

    .accordion-header {
        padding: 1.5rem 0;
        margin: 0 !important;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .accordion-content {
        display: none;
        padding-bottom: 1.5rem;
    }

    .accordion-content.active {
        display: block;
    }

    .accordion-header.active i {
        transform: rotate(180deg);
    }

    /* Bottom Nav */
    .bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid #eee;
        padding: 0.8rem 0;
        z-index: 100;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }

    .bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 0.7rem;
        color: #999;
        gap: 0.2rem;
    }

    .bottom-nav a.active {
        color: var(--text-main);
    }

    .bottom-nav i {
        font-size: 1.2rem;
        margin-bottom: 2px;
    }

    /* Adjust main content to not be hidden by bottom nav */
    body {
        padding-bottom: 70px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

