:root {
    --primary: #0a5c36;
    --primary-light: #16804d;
    --primary-dark: #063c23;
    --accent: #d4a373;
    --accent-hover: #c6925d;
    --bg-main: #fcfdfe;
    --bg-surface: #ffffff;
    --text-primary: #1c2a22;
    --text-secondary: #5a6e62;
    --border-color: #e5ebe8;
    --success: #34c759;
    --danger: #ff3b30;
    --warning: #ffcc00;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(10, 92, 54, 0.08);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
    --font-sans: 'Google Sans', 'Noto Sans Telugu', sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scrollbar-width: thin;
    scrollbar-color: rgba(203, 213, 225, 0.7) transparent;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(203, 213, 225, 0.7);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.9);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: none;
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 42px;
    object-fit: contain;
}

.logo-text {
    font-weight: 700;
    font-size: 20px;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.search-bar-container {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background-color: #f4f7f5;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    background-color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(10, 92, 54, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    background: transparent;
    border: none;
    cursor: pointer;
}

.nav-btn:hover {
    background: rgba(10, 92, 54, 0.05);
    color: var(--primary);
}

.cart-icon-container {
    position: relative;
}

.cart-count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Category Bar */
.category-nav {
    border-bottom: none;
    background: #fff;
}

.category-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 28px;
    position: relative;
}

.category-item {
    padding: 14px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-item:hover, .category-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 240px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    display: flex;
    flex-direction: column;
    z-index: 50;
}

.dropdown-link {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
}

.dropdown-link:hover {
    background: rgba(10, 92, 54, 0.05);
    color: var(--primary);
}

/* Grid & Layouts */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    min-height: calc(100vh - 400px);
}

/* Hero Carousel */
.hero-carousel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 280px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(6, 60, 35, 0.85) 0%, rgba(6, 60, 35, 0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
    padding: 32px;
    color: white;
}

.hero-title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 28px;
}

.hero-btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--accent);
    color: var(--primary-dark);
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(212, 163, 115, 0.4);
}

.hero-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.carousel-indicators {
    position: absolute;
    bottom: 24px;
    right: 48px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.carousel-indicator.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

/* Category Grid */
.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-link {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

/* Product Card */
.product-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(10, 92, 54, 0.2);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent);
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    z-index: 2;
}

.product-img-container {
    height: 190px;
    background: #fdfdfd;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.product-card-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-card:hover .product-card-img {
    transform: scale(1.05);
}

.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-brand {
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 4px;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
}

.product-pricing {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 14px;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.product-mrp {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.btn-buy {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: var(--radius-sm);
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.btn-buy:hover {
    background-color: var(--primary-light);
}

/* Custom UI Popups / Dialogs */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 42, 26, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999 !important;
    padding: 24px;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
    transform: scale(0.95);
    opacity: 0;
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalIn {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(10, 92, 54, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.modal-icon.danger {
    background: rgba(255, 59, 48, 0.08);
    color: var(--danger);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary-dark);
}

.modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-light);
}

.btn-secondary {
    background-color: #f4f7f5;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: #e5ebe8;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #e02d23;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    color: #b0c0b6;
}

/* Footer Section */
footer {
    background-color: #111a15;
    color: #e5ebe8;
    padding: 64px 24px 24px 24px;
    border-top: 1px solid #1a2a22;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-column h4 {
    font-size: 16px;
    color: white;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
    font-size: 14px;
}

.footer-links a {
    color: #92a499;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid #1a2a22;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #92a499;
    flex-wrap: wrap;
    gap: 16px;
}

/* Product Detail Styles */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.main-image-wrap {
    height: 450px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.main-image-wrap img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.thumbnails-wrap {
    display: flex;
    gap: 12px;
}

.thumbnail-btn {
    width: 80px;
    height: 80px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    cursor: pointer;
}

.thumbnail-btn.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 92, 54, 0.1);
}

.thumbnail-btn img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.detail-info {
    display: flex;
    flex-direction: column;
}

.detail-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
    line-height: 1.2;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 14px;
}

.detail-price-box {
    background: #f4f7f5;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.detail-pricing {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.detail-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.detail-mrp {
    font-size: 16px;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.detail-discount {
    background: var(--accent);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

/* Bulk Pricing Table */
.bulk-table-wrap {
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.bulk-table-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bulk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bulk-table th, .bulk-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.bulk-table th {
    font-weight: 600;
    color: var(--text-secondary);
}

.bulk-table tr:hover td {
    background: rgba(10, 92, 54, 0.02);
}

/* Cart Controls */
.cart-actions-wrap {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    overflow: hidden;
}

.qty-btn {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #f4f7f5;
    color: var(--primary);
}

.qty-input {
    width: 44px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    outline: none;
}

/* Cart Page */
.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.cart-items-panel {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.cart-item-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-row:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px;
    background: #fdfdfd;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary);
}

.cart-summary-panel {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    height: fit-content;
    box-shadow: var(--shadow-sm);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.summary-row.total {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
}

/* Form Styles */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
}

/* Responsive Table Utility */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 20px 16px;
    }
    .detail-layout, .cart-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .main-image-wrap {
        height: 300px;
        padding: 12px;
    }
    .detail-title {
        font-size: 22px;
    }
    .detail-price {
        font-size: 22px;
    }
    .cart-items-panel, .cart-summary-panel {
        padding: 16px 14px;
    }
    .cart-item-row {
        display: grid;
        grid-template-columns: 70px 1fr auto;
        grid-template-areas:
            "img details remove"
            "qty subtotal subtotal";
        gap: 12px;
        align-items: center;
        padding: 14px 0;
        position: relative;
    }
    .cart-item-img {
        grid-area: img;
        width: 70px;
        height: 70px;
    }
    .cart-item-details {
        grid-area: details;
    }
    .cart-item-remove {
        grid-area: remove;
        margin-left: 0;
        justify-self: end;
    }
    .cart-item-qty {
        grid-area: qty;
        margin: 0;
    }
    .cart-item-subtotal {
        grid-area: subtotal;
        justify-self: end;
        text-align: right;
        min-width: auto;
    }
    .cart-actions-wrap {
        flex-direction: column;
        gap: 12px;
    }
    .header-container {
        flex-wrap: wrap;
    }
    .search-bar-container {
        order: 3;
        min-width: 100%;
    }
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .admin-banners-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .product-info {
        padding: 10px;
    }
    .product-title {
        font-size: 13px;
        height: 36px;
    }
    .product-price {
        font-size: 15px;
    }
}
