:root {
    --primary-color: #d84315; /* A vibrant rust/orange color */
    --text-color: #333;
    --bg-color: #fcfcfc;
    --border-color: #eee;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Announcement Bar */
.top-announcement-bar {
    background: #2a3138;
    color: #f1f1f1;
    font-size: 0.85rem;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.announcement-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.announcement-text {
    letter-spacing: 0.5px;
    font-weight: 300;
}

.announcement-contacts {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-item {
    color: #f1f1f1;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.contact-item:hover {
    color: #ff9e80;
    text-decoration: none;
}

.contact-item.wa-link {
    background: #25D366;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.contact-item.wa-link:hover {
    background: #20ba5a;
    color: #fff;
}

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Brand Logo with Folk Art Mark */
.brand-logo-wrapper {
    display: flex;
    align-items: center;
}

.brand-logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-logo-link:hover {
    text-decoration: none;
}

.brand-logo-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.brand-titles {
    display: flex;
    flex-direction: column;
}

.brand-founder {
    font-family: 'Georgia', serif;
    font-size: 0.85rem;
    color: #777;
    letter-spacing: 1px;
    font-style: italic;
    line-height: 1.1;
}

.brand-name {
    font-family: 'Georgia', serif;
    font-size: 1.35rem;
    font-weight: bold;
    color: #222;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.main-nav > ul.nav-menu {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 500;
    text-decoration: none;
    display: block;
}

/* Dropdown CSS */
.dropdown {
    position: relative;
}

.dropdown > a {
    cursor: pointer;
    user-select: none;
    padding: 8px 4px;
}

.main-nav .dropdown-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    z-index: 1000;
    flex-direction: column !important;
    gap: 0 !important;
    border-radius: 6px;
    border: 1px solid #eee;
    padding: 6px 0;
    margin: 0;
}

/* Only display when JS sets .open class - strictly exclusive */
.main-nav .dropdown.open > .dropdown-menu {
    display: flex !important;
}

.dropdown-menu li {
    padding: 10px 18px;
    border-bottom: 1px solid #f3f3f3;
    position: relative;
    list-style: none;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    color: #333;
    transition: color 0.15s ease;
}

.dropdown-menu a:hover {
    color: var(--primary-color);
}

/* Nested Submenu for Saree Types */
.dropdown-submenu {
    position: relative;
}

.main-nav .dropdown-submenu .submenu {
    display: none !important;
    position: absolute;
    top: -6px;
    left: 100%;
    background: #fff;
    min-width: 250px;
    max-height: 420px;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-radius: 6px;
    border: 1px solid #eee;
    z-index: 1001;
    flex-direction: column !important;
    padding: 6px 0;
    margin: 0;
}

.main-nav .dropdown-submenu.open > .submenu {
    display: flex !important;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: #fff8f5;
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 20px;
}

.btn:hover {
    background: #bf360c;
    text-decoration: none;
}

/* Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.category-card {
    background: #fff;
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    background: #fff;
}

/* Product List Thumbnails */
.product-thumb {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
    object-fit: cover;
    aspect-ratio: 2/3;
}

/* Product Detail Page */
.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .product-detail-container {
        grid-template-columns: 1fr;
    }
}

.product-images .main-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.thumbnail-image {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.thumbnail-image:hover {
    border-color: var(--primary-color);
}

.product-info h2 {
    margin-top: 0;
    font-size: 2em;
}

.product-info .price {
    font-size: 1.5em;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 20px;
}

.product-info .attributes ul {
    list-style: none;
    padding: 0;
}

.product-info .attributes li {
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color);
    text-transform: capitalize;
}

.actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.add-to-cart-btn {
    width: 100%;
    font-size: 1.2em;
    padding: 15px;
    cursor: pointer;
}

.stock-status {
    font-weight: bold;
}

.in-stock {
    color: green;
}

.out-of-stock {
    color: red;
}

.btn.disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Cart & Checkout */
.cart-section {
    max-width: 800px;
    margin: 40px auto;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-img {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 20px;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-details h4 {
    margin: 0 0 5px 0;
}

.cart-item-actions button {
    background: #eee;
    border: none;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 1.2em;
    border-radius: 4px;
}

.cart-item-actions span {
    margin: 0 15px;
    font-weight: bold;
}

.cart-summary {
    text-align: right;
    margin-top: 20px;
    font-size: 1.5em;
}

.checkout-form-container {
    background: #fff;
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}

.checkout-btn {
    width: 100%;
    font-size: 1.2em;
    padding: 15px;
    cursor: pointer;
}

/* Mobile Dropdown Fixes */
@media (max-width: 768px) {
    .main-nav .dropdown-menu, .main-nav .dropdown-submenu .submenu {
        position: static;
        box-shadow: none;
        width: 100%;
        max-height: none;
    }
    
    .main-nav .dropdown-menu {
        background: #fdfdfd;
        margin-top: 5px;
    }
    
    .main-nav .dropdown-submenu .submenu {
        background: #f7f7f7;
        padding-left: 15px;
    }
    
    .main-nav > ul.nav-menu {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
