/* Font Face Declaration for Figtree - Single weight file */
@font-face {
    font-family: 'Figtree';
    src: url('/assets/liabase/fonts/Figtree_weight.woff2') format('woff2');
    font-weight: 300 700; /* Support all weights with single file */
    font-style: normal;
    font-display: swap;
}

/* Note: Since we're using a single font file, the browser will synthesize bold weights.
   If you have separate weight files, update the @font-face declarations accordingly. */

/* Additional available fonts in the directory (optional use) */
@font-face {
    font-family: 'Montserrat';
    src: url('/assets/liabase/fonts/montserrat-regular.woff2') format('woff2'),
         url('/assets/liabase/fonts/montserrat-regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/assets/liabase/fonts/roboto-regular.woff2') format('woff2'),
         url('/assets/liabase/fonts/roboto-regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Segoe UI';
    src: url('/assets/liabase/fonts/SegoeUI.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Environmental theme variables inspired by reference image */
:root {
    --primary-color: #2dd4bf;
    --primary-dark: #0d9488;
    --secondary-color: #64748b;
    --accent-color: #059669;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --background-light: #f8fafc;
    --background-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Figtree', 'Segoe UI', Roboto, Montserrat, -apple-system, BlinkMacSystemFont, sans-serif;
    /*background-color: var(--background-light);*/
    background-color: transparent;
    color: var(--text-dark);
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

button, input, select, textarea {
    font-family: 'Figtree', 'Segoe UI', Roboto, Montserrat, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Remove text decoration from all links */
a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* Header */
.eco-header {
    background: var(--background-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    padding: 0.75rem 0;
    width: 100%;
}

.header-wrapper {
    max-width: 72vw;
    margin: 0 auto;
    padding: 0 20px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brand Logo Styles */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
}

.brand-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    line-height: 1;
}

/* Ensure link doesn't affect brand text styling */
a.brand-logo:hover {
    text-decoration: none;
}

a.brand-logo .brand-text h1 {
    color: var(--primary-color);
    text-decoration: none;
}

.brand-text .tagline {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1;
}

.eco-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.eco-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.eco-nav a:hover {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Language Picker */
.language-picker {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.language-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.language-btn i {
    font-size: 0.875rem;
}

.language-btn .fa-chevron-down {
    font-size: 0.625rem;
    transition: transform 0.2s;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    display: none;
    z-index: 1001;
}

.language-dropdown.show {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.2s;
}

.lang-option:hover {
    background: var(--background-light);
    color: var(--text-dark);
}

.lang-option.active {
    background: #f1f5f9;
    font-weight: 600;
}

.lang-option:first-child {
    border-radius: 8px 8px 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 8px 8px;
}

.flag {
    font-size: 1.125rem;
}

.cart-btn {
    position: relative;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--text-dark);
    font-size: 0.9rem;
    padding: 0;
}

.cart-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.cart-icon {
    font-size: 1rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

.login-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.login-btn:hover {
    background: var(--primary-dark);
    color: white;
    transform: scale(1.05);
}

.user-avatar {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    position: relative;
}

.user-avatar:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    display: none;
    z-index: 1000;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.user-dropdown a:hover {
    background: var(--background-light);
}

.user-dropdown a i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, var(--background-white) 0%, var(--background-light) 100%);
    padding: 1.5rem 0 2rem 0;
    text-align: center;
    width: 100%;
}

.hero-wrapper {
    max-width: 72vw;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content {
    margin-top: 9px;
    margin-bottom: 9px;
}

.hero-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.hero-section p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.3;
}

.category-tabs-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.category-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    overflow: hidden;
    max-width: 600px;
}

.tab-btn {
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.4rem 1rem;
    margin-top: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.85rem;
    white-space: nowrap;
}

.more-categories-btn {
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.85rem;
    display: none;
    position: relative;
}

.more-categories-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    display: none;
    z-index: 100;
}

.more-categories-dropdown.show {
    display: block;
}

.more-categories-dropdown .tab-btn {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid var(--border-color);
}

.more-categories-dropdown .tab-btn:last-child {
    border-bottom: none;
}

.user-dropdown-wrapper {
    position: relative;
}

.more-categories-btn i {
    margin-left: 0.3rem;
    transition: transform 0.2s ease;
    font-size: 0.7rem;
}

.more-categories-btn.show i {
    transform: rotate(180deg);
}

.more-categories-btn:hover,
.more-categories-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Products grid */
.products-section {
    padding: 2rem 0;
    width: 100%;
}

.products-wrapper {
    max-width: 72vw;
    margin: 0 auto;
    padding: 0 20px;
}

.products-grid {
    display: grid;
    gap: 0.75rem;
    /* 4 columns on extra large screens (1200px+) */
    grid-template-columns: repeat(4, 1fr);
}

/* 3 columns on desktop (992px - 1199px) */
@media (max-width: 1199px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 2 columns on tablet (768px - 991px) */
@media (max-width: 991px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* 1 column on smartphone (767px and below) */
@media (max-width: 767px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card-link:hover {
    text-decoration: none;
}

.product-card {
    background: var(--background-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.product-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: linear-gradient(45deg, var(--background-light), var(--border-color));
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

.product-image:hover {
    transform: scale(1.05);
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--background-light), var(--border-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 2.5rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.product-info {
    padding: 0 0.75rem 0.75rem 0.75rem;
    margin-top: 9px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-details {
    flex: 1;
}

.product-details > * {
    margin-bottom: 0.5rem;
}

.product-details > *:last-child {
    margin-bottom: 0;
}

.product-name {
    font-size: 0.81rem;
    font-weight: 600;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.72);
    padding: 6px 10px;
    margin: 0;
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 2;
    border-radius: var(--radius-sm);
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-description {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: var(--background-light);
    color: var(--text-dark);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.feature-tag i {
    font-size: 0.65rem;
    opacity: 0.9;
}

.feature-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Filter Bar */
.filter-bar-wrapper {
    margin-top: 1.5rem;
    padding: 0;
}

.filter-bar-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--primary-color);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.filter-count {
    background: var(--primary-color);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Filter Modal */
.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    pointer-events: none;
}

.filter-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.filter-modal.show .filter-modal-overlay {
    opacity: 1;
    pointer-events: auto;
}

.filter-modal-content {
    position: fixed;
    left: -550px;
    top: 0;
    height: 100vh;
    width: 500px;
    max-width: 90vw;
    background: var(--background-white);
    box-shadow: var(--shadow-lg);
    transition: left 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

/* Desktop - wider modal */
@media (min-width: 1200px) {
    .filter-modal-content {
        width: 550px;
        left: -550px;
    }
}

/* Tablet styles */
@media (max-width: 1024px) {
    .filter-modal-content {
        width: 450px;
        left: -450px;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    .filter-modal-content {
        width: 100%;
        max-width: 100%;
        left: -100%;
    }
}

.filter-modal.show .filter-modal-content {
    left: 0;
}

.filter-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.filter-modal-close:hover {
    color: var(--text-dark);
}

.filter-modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.2;
}

.filter-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    line-height: 1.2;
}

/* Filter Groups */
.filter-group {
    margin-bottom: 0.15rem;
}

.filter-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    line-height: 1.2;
    font-size: 0.9rem;
}

.filter-group-header:hover {
    background: var(--background-light);
}

.filter-group-header .toggle-icon {
    font-size: 0.7rem;
    color: var(--text-light);
    transition: transform 0.2s ease;
}

.filter-group-header.active .toggle-icon {
    transform: rotate(90deg);
}

.filter-badge {
    margin-left: auto;
    background: var(--primary-color);
    color: white;
    padding: 0.1rem 0.35rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
}

.filter-group-content {
    padding: 0.25rem 0.75rem 0.5rem 1rem;
}

.filter-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.15rem 0.75rem;
}

/* Filter Controls */
.filter-checkbox,
.filter-radio {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0;
    cursor: pointer;
    line-height: 1;
}

label {
    display: inline-block;
    margin-bottom: 0;
}

.filter-checkbox input[type="checkbox"],
.filter-radio input[type="radio"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    margin: 0;
}

.filter-checkbox span,
.filter-radio span {
    color: var(--text-dark);
    font-size: 0.85rem;
    line-height: 1.3;
}

/* Feature Tag Filters */
.feature-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    margin: 0.15rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    opacity: 0.7;
    line-height: 1.2;
}

.feature-filter-tag:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.feature-filter-tag.active {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.feature-filter-tag i {
    font-size: 0.75rem;
}

/* Price Range */
.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.price-input {
    flex: 1;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    line-height: 1.1;
}

/* Filter Modal Footer */
.filter-modal-footer {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.filter-cancel-btn,
.filter-apply-btn {
    flex: 1;
    padding: 0.6rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.2;
}

.filter-cancel-btn {
    background: var(--background-light);
    color: var(--text-dark);
}

.filter-cancel-btn:hover {
    background: var(--border-color);
}

.filter-apply-btn {
    background: var(--primary-color);
    color: white;
}

.filter-apply-btn:hover {
    background: var(--primary-dark);
}

.filter-reset-btn {
    width: 100%;
    padding: 0.3rem;
    margin: 0.25rem 0;
    background: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.filter-reset-btn:hover {
    background: var(--background-light);
}

/* Active Filters Display */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.active-filter-tag button {
    background: none;
    border: none;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.rating-stars {
    color: #fbbf24;
    font-size: 0.9rem;
}

.rating-text {
    color: var(--text-light);
    font-size: 0.75rem;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    gap: 0.5rem;
}

.price-container {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.product-uom {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 400;
    white-space: nowrap;
}

.add-to-cart-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.add-to-cart-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.add-to-cart-btn:active {
    transform: scale(0.95);
}

/* Shopping cart sidebar (right) */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -45%;
    width: 33%;
    height: 100vh;
    background: var(--background-white);
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.checkout-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.checkout-btn:hover {
    background: var(--primary-dark);
}

.clear-cart-btn {
    width: 100%;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 0.5rem;
}

.clear-cart-btn:hover {
    background: #c82333;
}

/* Cart item controls */
.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.5rem;
}

.cart-item-info {
    flex: 1;
    margin-left: 1rem;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: background 0.2s ease;
}

.quantity-btn:hover {
    background: var(--primary-dark);
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
    font-weight: 600;
}

.remove-item-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-item-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Accordion styles for product details */
.accordion {
    margin-bottom: 1rem;
}

.accordion-header {
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: background 0.2s ease;
}

.accordion-header:hover {
    background: var(--border-color);
}

.accordion-header.active {
    background: var(--primary-color);
    color: white;
}

.accordion-content {
    display: none;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: var(--background-white);
}

.accordion-content.active {
    display: block;
}

.accordion-toggle {
    transition: transform 0.2s ease;
    color: var(--primary-color) !important;
    font-weight: 900 !important;
    font-size: 1.1rem !important;
}

.accordion-toggle.active {
    transform: rotate(180deg);
}

.accordion-header.active .accordion-toggle {
    color: white !important;
}

/* Old checkout modal CSS removed - using Frappe dialogs */

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-secondary:hover {
    background: #475569;
}

/* Old modal CSS removed - using Frappe dialogs */

/* Footer */
.eco-footer {
    background: var(--text-dark);
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 2.5rem;
    width: 100%;
}

.footer-wrapper {
    max-width: 72vw;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.4;
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 991px) {
    .header-wrapper,
    .footer-wrapper,
    .hero-wrapper,
    .products-wrapper {
        max-width: 100%;
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .header-wrapper,
    .footer-wrapper,
    .hero-wrapper,
    .products-wrapper {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .eco-nav ul {
        gap: 0.75rem;
    }
    
    .hero-section h2 {
        font-size: 1.5rem;
    }
    
    .hero-section p {
        font-size: 0.9rem;
    }
    
    .category-tabs-wrapper {
        padding: 0 15px;
    }
    
    .category-tabs {
        max-width: 100%;
    }
    
    .tab-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .product-price {
        font-size: 0.95rem;
    }
    
    .product-uom {
        font-size: 0.7rem;
    }
    
    .add-to-cart-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

/* Tablet screens */
@media (min-width: 769px) and (max-width: 1024px) {
    .cart-sidebar {
        width: 45%;
        right: -45%;
    }
    
    .cart-sidebar.open {
        right: 0;
    }
}

/* Large screens optimization */
@media (min-width: 1400px) {
    .header-wrapper,
    .footer-wrapper,
    .hero-wrapper,
    .products-wrapper {
        max-width: 1200px;
    }
}

/* Loading states */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: var(--text-light);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem 0;
}

.pagination {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn {
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-dark);
    text-decoration: none;
    min-width: 36px;
    text-align: center;
    font-size: 0.85rem;
}

.pagination-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn:disabled:hover {
    background: var(--background-white);
    border-color: var(--border-color);
    color: var(--text-dark);
}

.pagination-info {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    animation: fadeIn 0.5s ease forwards;
}

/* Review Modal Styles */
.review-rating-stars {
    display: flex;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.review-star {
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
}

.review-star:hover,
.review-star.selected {
    color: #f39c12;
}

.review-star.filled {
    color: #f39c12;
}

/* Frappe Dialog review stars */
.frappe-dialog .review-rating-stars {
    display: flex;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.frappe-dialog .review-star {
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
}

.frappe-dialog .review-star:hover,
.frappe-dialog .review-star.selected {
    color: #f39c12;
}

.frappe-dialog .review-star.filled {
    color: #f39c12;
}


/* Make rating stars clickable on product cards */
.product-rating .rating-stars {
    cursor: pointer;
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.product-rating .rating-stars:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.product-rating .rating-stars:active {
    transform: scale(0.95);
}

/* Custom Review Modal */
.review-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-modal {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.review-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.review-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-modal-close:hover {
    color: #000;
}

.review-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.review-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.review-modal .form-group {
    margin-bottom: 1rem;
}

.review-modal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.review-modal .form-control {
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out;
}

.review-modal .form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
}

.review-modal .btn {
    padding: 0.375rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    border: 1px solid transparent;
}

.review-modal .btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.review-modal .btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
}

.review-modal .btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.review-modal .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}