/* 
  PS Value Mart - CSS Design System
*/

:root {
    /* Color Palette based on Logo */
    --color-primary-green: #2e7d32;
    /* Dark green for VALUE */
    --color-light-green: #689f38;
    /* Light green for leaves/cart */
    --color-primary-orange: #ef6c00;
    /* Dark orange for MART */
    --color-light-orange: #ff9800;
    /* Light orange for PS */
    --color-gold: #fbc02d;
    /* Gold swoosh */

    /* Neutral Colors for Backgrounds & Text */
    --color-bg-light: #fffdf8;
    /* Cream/warm background */
    --color-bg-white: #ffffff;
    --color-text-dark: #333333;
    --color-text-medium: #666666;
    --color-text-light: #999999;
    --color-border: #e0e0e0;

    /* Semantic Colors */
    --color-price: #d32f2f;
    --color-success: #2e7d32;
    --color-badge: #ff5252;

    /* Typography */
    --font-main: 'Outfit', sans-serif;

    /* Shadows & Radii */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 12px 32px rgba(239, 108, 0, 0.15);
    /* Orange tinted shadow */

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

button,
input,
select {
    font-family: inherit;
    outline: none;
    border: none;
}

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

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--color-primary-green);
}

.section-title span {
    color: var(--color-primary-orange);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-orange), var(--color-light-orange));
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(239, 108, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 108, 0, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary-green);
    border: 2px solid var(--color-primary-green);
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

/* --- Header & Navigation --- */
.header {
    background-color: var(--color-bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo a {
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary-green);
    line-height: 1.1;
}

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

.logo .slogan {
    font-size: 0.75rem;
    color: var(--color-text-medium);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.search-bar {
    flex: 1;
    max-width: 400px;
    display: flex;
    background-color: #f5f5f5;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: var(--transition-fast);
}

.search-bar:focus-within {
    border-color: var(--color-light-orange);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}

.search-bar input {
    flex: 1;
    padding: 10px 20px;
    background: transparent;
    font-size: 0.95rem;
}

.search-bar button {
    background: var(--color-primary-green);
    color: white;
    padding: 0 20px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.search-bar button:hover {
    background: var(--color-light-green);
}

.desktop-nav ul {
    display: flex;
    gap: 24px;
}

.desktop-nav a {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text-dark);
    position: relative;
}

.desktop-nav a:hover {
    color: var(--color-primary-orange);
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-primary-orange);
    transition: width var(--transition-fast);
}

.desktop-nav a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-icon {
    position: relative;
    font-size: 1.4rem;
    color: var(--color-primary-green);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--color-badge);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--color-bg-white);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--color-text-dark);
    background: transparent;
    cursor: pointer;
}

/* --- Footer --- */
.footer {
    background-color: #1a1a1a;
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about h2 {
    font-size: 1.8rem;
    color: var(--color-light-green);
    margin-bottom: 15px;
}

.footer-about h2 span {
    color: var(--color-primary-orange);
}

.footer-about p {
    color: #bbb;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--color-primary-orange);
    color: white;
}

.footer-links h3,
.footer-contact h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--color-primary-orange);
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: #bbb;
}

.footer-links ul li a:hover {
    color: var(--color-light-orange);
    padding-left: 5px;
}

.footer-contact p {
    color: #bbb;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact i {
    color: var(--color-primary-orange);
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #25D366;
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition-fast);
    margin-top: 10px;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    font-size: 0.9rem;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(26, 26, 26, 0.85) 0%, rgba(26, 26, 26, 0.4) 60%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 600px;
}

.hero-content h2 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-content h2 span {
    color: var(--color-gold);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #f1f1f1;
}

/* --- Featured Products --- */
.featured-products {
    padding: 80px 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

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

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(239, 108, 0, 0.3);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--color-badge);
    color: white;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: #f9f9f9;
}

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

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

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-variants {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.variant-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.variant-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-medium);
    min-width: 60px;
}

.variant-group select {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: #f5f5f5;
    color: var(--color-text-dark);
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color var(--transition-fast);
}

.variant-group select:focus {
    border-color: var(--color-primary-orange);
    background-color: white;
}

.stock-status {
    font-size: 0.85rem;
    color: var(--color-primary-green);
    margin-bottom: 5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    margin-top: auto;
}

.current-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-primary-green);
}

.original-price {
    font-size: 0.95rem;
    color: var(--color-text-light);
    text-decoration: line-through;
}

.add-to-cart-btn {
    width: 100%;
    justify-content: center;
    padding: 10px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, var(--color-primary-green), var(--color-light-green));
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
    transform: translateY(-2px);
}

/* --- Categories Section --- */
.categories-section {
    background-color: var(--color-bg-white);
    padding: 80px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.categories-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.category-card {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.category-card:hover,
.category-card.active {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-light-orange);
    background: white;
}

.category-card.active .cat-icon {
    background: var(--color-primary-orange);
    color: white;
    transform: scale(1.1);
}

.cat-icon {
    width: 70px;
    height: 70px;
    background: rgba(239, 108, 0, 0.1);
    color: var(--color-primary-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 15px;
    transition: var(--transition-smooth);
}

.category-card:hover .cat-icon {
    background: var(--color-primary-orange);
    color: white;
    transform: scale(1.1);
}

.category-card h3 {
    font-size: 1.1rem;
    color: var(--color-text-dark);
    font-weight: 600;
    text-align: center;
}

/* --- Features Section --- */
.features-section {
    padding: 40px 20px 80px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    background: var(--color-bg-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(-40px);
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--color-primary-green);
    margin-bottom: 15px;
    transition: var(--transition-fast);
}

.feature-item:hover .feature-icon {
    transform: scale(1.1) translateY(-5px);
    color: var(--color-primary-orange);
}

.feature-item h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--color-text-dark);
    font-weight: 700;
}

.feature-item p {
    color: var(--color-text-medium);
    font-size: 0.95rem;
}

/* --- About Section --- */
.about-section {
    padding: 80px 20px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-top: 40px;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--color-text-medium);
    margin-bottom: 20px;
}

.about-features {
    display: grid;
    gap: 15px;
    margin-top: 25px;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--color-text-dark);
}

.about-feature i {
    color: var(--color-primary-green);
    font-size: 1.2rem;
}

.about-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* --- Cart Sidebar --- */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 100%;
    height: 100%;
    background: white;
    z-index: 2001;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    transition: right var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-overlay.active {
    display: block;
    opacity: 1;
}

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

.cart-header h3 {
    font-size: 1.3rem;
    color: var(--color-primary-green);
}

.close-cart {
    background: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--color-text-medium);
}

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

.empty-cart-msg {
    text-align: center;
    color: var(--color-text-light);
    margin-top: 50px;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f5f5f5;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

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

.cart-item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.cart-item-info p {
    font-size: 0.85rem;
    color: var(--color-text-medium);
}

.cart-item-price {
    font-weight: 700;
    color: var(--color-primary-green);
    margin-top: 5px;
}

.remove-item {
    color: var(--color-badge);
    cursor: pointer;
    font-size: 0.9rem;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--color-border);
    background: #fcfcfc;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.checkout-btn {
    width: 100%;
    justify-content: center;
}

/* --- Mobile Nav Refinement --- */
.mobile-nav-active {
    overflow: hidden;
}

.admin-link-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-weight: 600;
    color: var(--color-light-orange) !important;
}

/* --- Media Queries --- */
@media (max-width: 900px) {
    .desktop-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100%;
        background: white;
        z-index: 1500;
        transition: left 0.3s ease;
        padding-top: 80px;
        display: block !important;
    }

    .desktop-nav.active {
        left: 0;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .desktop-nav ul {
        flex-direction: column;
        padding: 0 40px;
        gap: 25px;
    }

    .desktop-nav a {
        font-size: 1.2rem;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 1600;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .search-bar {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-width: 100%;
        margin: 10px 20px;
        display: none;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }
}