/* 
 * Evergen Corporate Website - Custom Premium Design System
 * Primary Color Scheme: Red (#c41411) and White
 * Readability: Prompt Google Font
 */

@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap');

:root {
    --primary: #c41411;
    --primary-hover: #a30f0d;
    --primary-light: #fdeeed;
    --primary-glow: rgba(196, 20, 17, 0.15);
    
    --white: #ffffff;
    --bg-light: #f9fafb;
    --bg-alt: #f3f4f6;
    
    --text-dark: #111827;
    --text-gray: #4b5563;
    --text-light: #9ca3af;
    --text-white: #ffffff;
    
    --border-color: #e5e7eb;
    
    --success: #10b981;
    --success-hover: #059669;
    --success-light: #ecfdf5;
    
    --danger: #ef4444;
    
    --font-family: 'Prompt', sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

ul {
    list-style: none;
}

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

/* --- Layout Container --- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-dark);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

/* --- Buttons & Badges --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-align: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--text-dark);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-alt);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-success {
    background-color: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background-color: var(--success-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success);
}

/* --- Shared Header Layout --- */
.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-container {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo-text span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-gray);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 12px;
    right: 12px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 9999px;
}

/* Premium Desktop Pill Navigation */
@media (min-width: 769px) {
    .nav-menu {
        background-color: var(--primary); /* Corporate red background */
        border-radius: 20px;
        padding: 0;
        overflow: visible;
        gap: 0;
        height: 48px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    }
    
    /* Apply rounded corners to the first and last items of the navy bar container */
    .nav-menu > *:first-child,
    .nav-menu > *:first-child > .nav-link {
        border-top-left-radius: 20px;
        border-bottom-left-radius: 20px;
    }
    
    .nav-menu > *:last-child,
    .nav-menu > *:last-child > .nav-link {
        border-top-right-radius: 20px;
        border-bottom-right-radius: 20px;
    }
    
    .nav-menu > .nav-link,
    .nav-menu > .nav-dropdown-wrapper {
        border-right: 1px solid #d9d9d9;
        display: flex;
        align-items: center;
        height: 100%;
    }
    
    .nav-menu > .nav-link:last-child,
    .nav-menu > .nav-dropdown-wrapper:last-child {
        border-right: none;
    }
    
    .nav-dropdown-wrapper {
        position: relative;
        display: flex;
        align-items: stretch;
    }
    
    .nav-link {
        font-weight: 500;
        font-size: 16px;
        color: var(--white) !important;
        padding: 0 1.75rem;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        border-radius: 0;
        height: 100%;
        background-color: transparent;
        white-space: nowrap;
    }
    
    .nav-link:hover, .nav-link.active {
        color: var(--white) !important;
        background-color: transparent !important;
    }
    
    .nav-link.active::after {
        display: none !important;
    }

    .nav-dropdown-content {
        position: absolute;
        top: 100%;
        left: 0;
        width: auto;
        min-width: 224px;
        background-color: var(--white);
        border-radius: 0;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
        border: 1px solid #cccccc;
        border-top: none;
        padding: 0;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.2s ease-out;
        overflow: hidden;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-toggle-btn {
    position: relative;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.cart-toggle-btn:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    transform: scale(1.05);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    flex-direction: column;
    justify-content: space-around;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 3px;
    transition: var(--transition);
}

/* --- Shared Footer Layout --- */
.footer-wrapper {
    background-color: var(--text-dark);
    color: #e5e7eb;
    padding-top: 4rem;
    padding-bottom: 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-info .logo-text {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-info p {
    color: #9ca3af;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.footer-title {
    color: var(--white);
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary);
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #9ca3af;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: #9ca3af;
}

.footer-contact i {
    color: var(--primary);
    margin-top: 0.25rem;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #9ca3af;
}

/* --- HOME PAGE STYLE --- */
.hero-slider {
    position: relative;
    background-color: var(--text-dark);
    height: 420px;
    overflow: hidden;
    color: var(--white);
}

.slide-item {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide-item.active {
    opacity: 1;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.slide-content {
    position: relative;
    z-index: 10;
    max-width: 650px;
}

.slide-content h2 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.slide-content p {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    color: #d1d5db;
}

.slider-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 15;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background-color: var(--primary);
    transform: scale(1.2);
}

/* Section Common Styling */
.section {
    padding: 5rem 0;
}

.section-alt {
    background-color: var(--bg-alt);
}

.section-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 3.5rem auto;
}

.section-tag {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary);
}

/* Home Intro Card Grid */
.intro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.intro-card {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
    border-top: 4px solid transparent;
}

.intro-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--primary);
}

.intro-icon {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.5rem auto;
}

.intro-card h3 {
    margin-bottom: 1rem;
}

.intro-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* Home news & promotion cards */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.news-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-img {
    width: 40%;
    background-size: cover;
    background-position: center;
    min-height: 220px;
}

.news-content {
    padding: 1.5rem;
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-type-badge {
    align-self: flex-start;
    margin-bottom: 0.75rem;
}

.news-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* --- PRODUCT PAGE STYLE --- */
.product-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    padding: 3rem 0;
}

.product-sidebar {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    height: fit-content;
}

.sidebar-title {
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-btn {
    display: flex;
    width: 100%;
    padding: 0.6rem 1rem;
    border: none;
    background: none;
    text-align: left;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.category-btn:hover, .category-btn.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Sidebar Filter Group Buttons */
.sidebar-filter-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.filter-group-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.7rem 0.5rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background: var(--bg-light);
    color: var(--text-gray);
    font-family: var(--font-family);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.filter-group-btn i {
    font-size: 1.15rem;
}

.filter-group-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.filter-group-btn.active {
    border-color: var(--primary);
    color: var(--white);
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(196, 20, 17, 0.25);
}

.filter-group-btn.active i {
    color: var(--white);
}

/* Category Search in Sidebar */
.category-search-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.category-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.8rem;
    pointer-events: none;
}

.category-search-input {
    width: 100%;
    padding: 0.55rem 2rem 0.55rem 2.1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 0.85rem;
    outline: none;
    background: var(--bg-light);
    transition: var(--transition);
}

.category-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--white);
}

.category-search-input::placeholder {
    color: var(--text-light);
    font-size: 0.82rem;
}

.category-search-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border: none;
    background: var(--border-color);
    color: var(--text-gray);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.65rem;
    transition: var(--transition);
}

.category-search-clear:hover {
    background: var(--primary);
    color: var(--white);
}

.category-no-result {
    text-align: center;
    color: var(--text-light);
    font-size: 0.88rem;
    padding: 1.5rem 0.5rem;
}

.category-no-result i {
    margin-right: 0.4rem;
    font-size: 1rem;
}

/* Variant Row in Admin Modal */
.variant-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.4rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    animation: variantSlideIn 0.2s ease-out;
}

@keyframes variantSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.variant-remove-btn {
    flex-shrink: 0;
    padding: 0.35rem 0.5rem !important;
}

/* Variant Pills on Frontend Product Cards */
.variant-pills-wrapper {
    margin-bottom: 0.6rem;
}

.variant-pills-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.variant-pills-label i {
    color: var(--primary);
    font-size: 0.65rem;
}

.variant-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.variant-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    background: var(--primary-light);
    color: var(--primary);
    font-family: var(--font-family);
    line-height: 1.3;
    min-width: 52px;
    text-align: center;
    position: relative;
}

.variant-pill:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(196, 20, 17, 0.25);
}

.variant-pill.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: var(--white);
    border-color: var(--primary-hover);
    box-shadow: 0 3px 10px rgba(196, 20, 17, 0.35);
    transform: translateY(-1px);
}

.variant-pill.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--primary-hover);
}

.product-unit {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 400;
}

.search-bar-container {
    margin-bottom: 2rem;
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    outline: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

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

.product-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    background-color: #f9fafb;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-cat {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    height: 3.6em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.product-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}

.product-price::after {
    content: ' ฿';
    font-size: 0.85rem;
    font-weight: 500;
}

.product-price.price-hidden::after {
    content: '';
}

/* --- SERVICES PAGE --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-left: 5px solid var(--primary);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.service-icon {
    font-size: 2rem;
    color: var(--primary);
}

.service-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- HELP AND SUPPORT PAGE --- */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--white);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-family);
    font-size: 1rem;
}

.faq-question::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--primary);
    transition: var(--transition);
}

.faq-item.active .faq-question::after {
    content: '-';
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.5rem;
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.7;
    transition: var(--transition);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-bottom: 1.5rem;
}

.help-form-container {
    max-width: 600px;
    margin: 3rem auto 0 auto;
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* --- CART DRAWER OVERLAY --- */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

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

.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    max-width: 100%;
    height: 100%;
    background-color: var(--white);
    z-index: 201;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

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

.cart-drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-gray);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-drawer-close:hover {
    background-color: var(--bg-alt);
}

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

.cart-drawer-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 0.5rem;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-val {
    width: 30px;
    text-align: center;
    font-size: 0.9rem;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 0.8rem;
    cursor: pointer;
    align-self: flex-start;
}

.cart-drawer-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.cart-total-price {
    color: var(--primary);
}

/* Empty cart state */
.empty-cart-message {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-light);
}

.empty-cart-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--border-color);
}

/* --- CART & CHECKOUT PAGE --- */
.cart-layout {
    display: grid;
    grid-template-columns: 1.7fr 1.3fr;
    gap: 3rem;
    padding: 3rem 0;
}

.cart-table-wrapper {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th, .cart-table td {
    padding: 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.cart-table th {
    font-weight: 600;
    color: var(--text-gray);
    font-size: 0.95rem;
}

.checkout-sidebar {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    height: fit-content;
}

/* Payment Method Toggle */
.payment-toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.payment-toggle-option {
    cursor: pointer;
    position: relative;
}

.payment-toggle-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.payment-toggle-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-light);
    transition: var(--transition);
    text-align: center;
}

.payment-toggle-content i {
    font-size: 1.5rem;
    color: var(--text-gray);
    transition: var(--transition);
}

.payment-toggle-content span {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-gray);
    transition: var(--transition);
}

.payment-toggle-option:hover .payment-toggle-content {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.payment-toggle-option.active .payment-toggle-content {
    border-color: var(--primary);
    background-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.payment-toggle-option.active .payment-toggle-content i {
    color: var(--primary);
}

.payment-toggle-option.active .payment-toggle-content span {
    color: var(--primary);
    font-weight: 600;
}

/* Success checkout page */
.success-card {
    max-width: 600px;
    margin: 5rem auto;
    background-color: var(--white);
    padding: 4rem 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
    border-top: 6px solid var(--success);
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--success-light);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem auto;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

/* --- ADMIN PANEL LAYOUT & VIEWS --- */
.admin-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-alt);
}

.admin-login-card {
    background-color: var(--white);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    border-top: 5px solid var(--primary);
}

.admin-login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background-color: var(--text-dark);
    color: #9ca3af;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #374151;
}

.admin-logo {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
}

.admin-menu li {
    margin-bottom: 0.5rem;
}

.admin-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: var(--transition);
}

.admin-menu-link:hover, .admin-menu-link.active {
    background-color: #1f2937;
    color: var(--white);
}

.admin-menu-link.active {
    border-left: 4px solid var(--primary);
}

.admin-logout-btn {
    margin-top: auto;
    color: #f87171;
}

.admin-logout-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.admin-content {
    background-color: var(--bg-light);
    padding: 2.5rem;
    overflow-y: auto;
}

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

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.stat-info h4 {
    font-size: 1.75rem;
    margin-bottom: 0.15rem;
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* Tables for CRUD */
.admin-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 0.75rem 0.65rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background-color: var(--bg-alt);
    font-weight: 600;
}

.admin-table tr:hover {
    background-color: var(--bg-light);
}

.admin-table-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.actions-cell {
    display: flex;
    gap: 5px;
}

/* Modal styling */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.open {
    display: flex;
}

.modal-container {
    background-color: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: modalOpen 0.3s ease-out;
}

@keyframes modalOpen {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-gray);
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-light);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

/* --- RESPONSIVENESS --- */
@media (max-width: 1024px) {
    .product-layout {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 2rem;
        gap: 1rem;
        border-top: 1px solid var(--border-color);
        transition: var(--transition);
        box-shadow: var(--shadow-md);
    }
    
    .nav-menu.open {
        left: 0;
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    .intro-grid, .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-card {
        flex-direction: column;
    }
    
    .news-img {
        width: 100%;
        height: 180px;
        min-height: auto;
    }
    
    .news-content {
        width: 100%;
    }
    
    .admin-layout {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        display: none;
    }
    
    .admin-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .slide-content h2 {
        font-size: 2rem;
    }
}

/* Premium Dropdown Navigation Styles */
.nav-dropdown-wrapper {
    position: relative;
    display: inline-block;
}
.nav-dropdown-wrapper:hover .nav-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown-wrapper:hover .nav-link i {
    transform: rotate(180deg);
}
.nav-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 224px; /* 14rem */
    background-color: var(--white);
    border-radius: 0; /* Sharp 90-degree corners */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
    border: 1px solid #cccccc;
    border-top: none;
    padding: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease-out;
    overflow: hidden;
}
.nav-dropdown-content a {
    display: block;
    padding: 0.75rem 1.25rem;
    font-size: 16px;
    font-weight: 400; /* normal */
    color: #666666;
    text-decoration: none;
    transition: all 0.2s ease;
    border-top: 1px solid #cccccc;
    white-space: nowrap;
    background-color: #ffffff !important;
}
.nav-dropdown-content a:first-child {
    border-top: none;
}
.nav-dropdown-content a:hover {
    background-color: #999999 !important;
    color: var(--white) !important;
}

@media (max-width: 768px) {
    .nav-dropdown-wrapper {
        display: block;
    }
    .nav-dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1.5rem;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: block;
        background-color: transparent;
    }
    .nav-dropdown-content a {
        padding: 0.5rem 0;
        font-size: 1rem;
        border-top: none;
        background-color: transparent !important;
        color: var(--text-gray) !important;
    }
    .nav-dropdown-wrapper .nav-link i {
        display: none;
    }
}

/* --- BRAND FLYOUT SUBMENU SYSTEM --- */

/* Sidebar Box and Grid adjustments for Full Width list items */
.product-sidebar {
    padding: 0 !important; /* Zero padding to allow list items and tabs to stretch full-width */
    overflow: visible !important; /* Allow the hover flyout to escape the sidebar box */
    border: 1px solid var(--border-color);
}

.sidebar-filter-group {
    display: flex;
    margin-bottom: 0 !important; /* No gap between tabs and categories list */
    border-bottom: 1px solid var(--border-color);
    background-color: var(--primary);
    overflow: hidden;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.filter-group-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    border-radius: 0;
    background: transparent;
    text-align: center;
}

.filter-group-btn:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.filter-group-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transform: none;
    box-shadow: none;
}

.filter-group-btn.active {
    background-color: rgba(0, 0, 0, 0.15); /* Sleek darker overlay for active tab */
    color: var(--white);
    box-shadow: none;
}

/* Category List Group Styling */
.category-list {
    margin: 0 !important;
    padding: 0 !important;
}

.category-list li {
    margin-bottom: 0 !important;
    border-bottom: 1px solid var(--border-color);
}

.category-list li:last-child {
    border-bottom: none;
}

.category-btn {
    display: flex;
    width: 100%;
    padding: 0.85rem 1.25rem !important;
    border: none;
    background: none;
    text-align: left;
    border-radius: 0 !important; /* Stretch square edges */
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-gray);
    cursor: pointer;
    transition: var(--transition);
    align-items: center;
}

.category-btn:hover,
.category-btn.active {
    background-color: #f3f4f6 !important;
    color: var(--text-dark) !important;
}

/* Hover/Active highlight matching the grey design in the mockup */
.category-list li.brand-submenu-wrapper:hover > .category-btn {
    background-color: #a6a6a6 !important; /* Shaded grey background on hover */
    color: var(--white) !important;
}

.category-list li.brand-submenu-wrapper:hover > .category-btn i {
    color: var(--white) !important;
}

/* Flyout Submenu Styles (Desktop) */
.brand-submenu-wrapper {
    position: relative;
}

.brand-submenu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    width: 250px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    padding: 0.5rem 0;
    margin-left: 2px; /* Small distance from the sidebar */
}

/* Display on Hover */
.brand-submenu-wrapper:hover .brand-submenu {
    display: block;
}

.brand-submenu-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
}

.brand-submenu-item:hover,
.brand-submenu-item.active {
    background-color: var(--primary-light) !important;
    color: var(--primary) !important;
    padding-left: 1.5rem; /* Micro slide-in animation */
}

/* Mobile & Tablet Responsive Accordion (1024px and below) */
@media (max-width: 1024px) {
    .brand-submenu-wrapper {
        position: static;
    }
    
    .brand-submenu {
        display: none;
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--border-color);
        margin-left: 0;
        padding-left: 1.5rem;
        background-color: var(--bg-light);
    }
    
    .brand-submenu-wrapper:hover .brand-submenu {
        display: block;
    }
    
    .brand-submenu-item {
        padding: 0.5rem 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    }
    
    .brand-submenu-item:last-child {
        border-bottom: none;
    }
}

/* Product Detail Modal styles */
.product-modal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .product-modal-grid {
        grid-template-columns: 1.1fr 1.3fr !important;
        gap: 2rem !important;
    }
}

.product-modal-left {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    min-height: 250px;
}

.product-modal-left img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-modal-left img:hover {
    transform: scale(1.03);
}

.product-modal-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


