/* Collapsible bank info block styles */

.bank-transfer-info-sidebar {
    position: relative;
}

.bank-info-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #0a7b0a;
    margin-bottom: 6px;
    user-select: none;
}

.bank-info-toggle i {
    margin-right: 6px;
    font-size: 18px;
    transition: transform 0.2s;
}

.bank-info-collapsed .bank-info-content {
    display: none;
}

.bank-info-toggle.collapsed i {
    transform: rotate(-90deg);
}

@media (max-width: 480px) {
    .bank-transfer-info-sidebar {
        font-size: 13px;
    }
    .bank-info-toggle {
        font-size: 14px;
        padding: 8px 0;
    }
    .bank-info-content {
        padding: 4px 0 0 0;
    }
}


/* Force show bank transfer info in cart sidebar for testing */

.bank-transfer-info-sidebar {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}


/* Reset and Base Styles - Compatible with Bootstrap */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans Sinhala', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    /* Prevent horizontal scrolling */
    min-height: 100vh;
    /* Ensure full viewport height */
}


/* List elements styling */

dl,
ol,
ul {
    margin-top: 0;
    margin-bottom: 0rem !important;
}


/* Critical fix for layout stability */

html {
    scroll-behavior: smooth;
}


/* Prevent layout shifts */

img {
    max-width: 100%;
    height: auto;
    display: block;
}


/* Override Bootstrap container for custom styling */

.container-custom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* Keep Bootstrap container intact */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* Fix layout shifts and shaking */

.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}


/* Disable problematic transitions that cause shaking */

*,
*::before,
*::after {
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
}


/* Re-enable smooth transitions only for specific elements */

.btn,
.product-card,
.cart-btn {
    transition: all 0.2s ease !important;
}


/* Header Styles */

.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    will-change: transform;
    /* Optimize for animations */
    transform: translateZ(0);
    /* Force hardware acceleration */
}

.top-bar {
    background: #2c5530;
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.top-bar .container-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 20px;
}

.contact-info i {
    margin-right: 5px;
}


/* Language Selector Styles */

.language-selector {
    position: relative;
}

.language-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 140px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.lang-option:hover {
    background: #f5f5f5;
    color: #2c5530;
}

.lang-option.active {
    background: #2c5530;
    color: white;
}

.lang-option .flag {
    font-size: 16px;
}

.navbar {
    padding: 20px 0;
    border-bottom: 2px solid #f0f8f0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
    box-shadow: 0 2px 15px rgba(44, 85, 48, 0.1);
}

.navbar .container-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.nav-brand:hover {
    transform: scale(1.02);
}

.nav-brand .logo {
    width: 110px;
    height: 55px;
    margin-right: 15px;
    filter: drop-shadow(2px 2px 4px rgba(44, 85, 48, 0.2));
}

.nav-brand h1 {
    color: #2c5530;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(44, 85, 48, 0.1);
    letter-spacing: -0.5px;
}

.search-bar {
    flex: 1;
    max-width: 550px;
    margin: 0 30px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 14px 55px 14px 20px;
    border: 2px solid #e0e9e0;
    border-radius: 30px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(44, 85, 48, 0.05);
}

.search-bar input:focus {
    border-color: #2c5530;
    box-shadow: 0 4px 20px rgba(44, 85, 48, 0.15);
    transform: translateY(-1px);
}

.search-bar input::placeholder {
    color: #888;
    font-style: italic;
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #2c5530, #1e3a21);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(44, 85, 48, 0.2);
}

.search-btn:hover {
    background: linear-gradient(135deg, #1e3a21, #2c5530);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(44, 85, 48, 0.3);
}

.cart-btn {
    background: linear-gradient(135deg, #f8fffe, #ffffff);
    border: 2px solid #e0e9e0;
    color: #2c5530;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding: 12px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(44, 85, 48, 0.05);
}

.cart-btn:hover {
    background: linear-gradient(135deg, #2c5530, #1e3a21);
    color: white;
    border-color: #2c5530;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.2);
}

.cart-count {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 3px;
    right: 3px;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.main-nav {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    padding: 12px 0;
    border-top: 1px solid #e0e9e0;
    box-shadow: 0 2px 10px rgba(44, 85, 48, 0.05);
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    padding: 14px 24px;
    display: block;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 15px;
    border-radius: 25px;
    background: transparent;
    border: 2px solid transparent;
}

.nav-menu a:hover {
    color: #2c5530;
    background: linear-gradient(135deg, #f0f8f0, #ffffff);
    border-color: #e0e9e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 85, 48, 0.1);
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    display: block;
}


/* Disable hover behavior on touch devices */

@media (hover: none) and (pointer: coarse) {
    .dropdown:hover .dropdown-menu {
        display: none !important;
    }
    .dropdown.active .dropdown-menu {
        display: block !important;
    }
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 250px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    display: none;
    z-index: 1000;
    border: 1px solid #eee;
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-menu a {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: #2c5530;
    padding-left: 25px;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu strong {
    color: #2c5530;
}

.dropdown-menu hr {
    margin: 5px 0;
    border: none;
    border-top: 1px solid #ddd;
}


/* Hero Section */

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.23), rgba(44, 85, 48, 0.5)), url('../images/logo/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 120px 0 60px;
    display: flex;
    align-items: center;
    min-height: 80vh;
    position: relative;
}

.hero-content {
    flex: 1;
    padding-right: 50px;
}

.hero-content h2 {
    font-size: 48px;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.3;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 30px;
    line-height: 1.8;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.cta-btn {
    background: #ffffff;
    color: #2c5530;
    padding: 15px 30px;
    border: 2px solid #2c5530;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.cta-btn:hover::before {
    left: 100%;
}

.cta-btn:hover {
    background: #2c5530;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.cta-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-image {
    flex: 1;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}


/* Sections */

.section-title {
    text-align: center;
    font-size: 36px;
    color: #2c5530;
    margin-bottom: 15px;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 18px;
    margin-bottom: 50px;
}


/* Categories */

.categories {
    padding: 80px 0;
    background: white;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}


/* Ensure desktop grid layout is maintained */

@media (min-width: 769px) {
    .category-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
        gap: 30px !important;
    }
    .products-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
        gap: 30px !important;
    }
    .services-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
        gap: 40px !important;
    }
    /* Desktop Top Bar */
    .top-bar {
        padding: 8px 0 !important;
        font-size: 14px !important;
    }
    .top-bar .container-custom {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: left !important;
        gap: 0 !important;
    }
    .contact-info span {
        margin-right: 20px !important;
        font-size: 14px !important;
    }
    /* Desktop Hero Section */
    .hero {
        flex-direction: row !important;
        text-align: left !important;
        padding: 120px 0 60px !important;
        background-attachment: fixed !important;
        min-height: 80vh !important;
    }
    .hero-content {
        padding-right: 50px !important;
        margin-bottom: 0 !important;
    }
    .hero-content h2 {
        font-size: 48px !important;
    }
    .hero-content p {
        font-size: 18px !important;
    }
    /* Desktop Contact Section */
    .contact-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 60px !important;
    }
    .contact-info {
        grid-template-columns: 1fr 1fr !important;
        gap: 30px !important;
    }
    .form-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
    }
    .contact-form {
        padding: 40px !important;
    }
    .section-title {
        font-size: 36px !important;
    }
    /* Desktop Footer */
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
        gap: 40px !important;
    }
}

.category-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.category-card::before {
    content: "👆 ක්ලික් කරන්න";
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(44, 85, 48, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.category-card img::before {
    content: "📦";
    font-size: 48px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


/* Category-specific background colors */

.category-card[data-category="rice"] img {
    background: linear-gradient(135deg, #fff8dc, #f5deb3);
}

.category-card[data-category="spices"] img {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
}

.category-card[data-category="vegetables"] img {
    background: linear-gradient(135deg, #55a3ff, #74b9ff);
}

.category-card[data-category="fruits"] img {
    background: linear-gradient(135deg, #fd79a8, #e84393);
}

.category-card[data-category="dairy"] img {
    background: linear-gradient(135deg, #e17055, #d63031);
}

.category-card[data-category="lentils"] img {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
}

.category-card[data-category="flour"] img {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
}

.category-card[data-category="snacks"] img {
    background: linear-gradient(135deg, #fd79a8, #e84393);
}

.category-card h3 {
    font-size: 24px;
    color: #2c5530;
    margin: 20px;
    font-weight: 600;
}

.category-card p {
    color: #666;
    margin: 0 20px 20px;
    line-height: 1.6;
}


/* Category View All Button */

.category-view-all {
    text-align: center;
    margin-top: 40px;
}

.view-all-btn {
    background: linear-gradient(135deg, #2c5530, #4a7c59);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3);
}

.view-all-btn:hover {
    background: linear-gradient(135deg, #4a7c59, #2c5530);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 85, 48, 0.4);
}

.view-all-btn i {
    margin-right: 10px;
}


/* Search Results and Category Pages */

.search-results,
.all-categories {
    padding: 80px 0;
    background: #f8f9fa;
    display: none;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.back-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.back-btn i {
    margin-right: 8px;
}


/* Category Filter Buttons */

.category-filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0;
}

.filter-btn {
    background: white;
    color: #2c5530;
    border: 2px solid #2c5530;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: #2c5530;
    color: white;
    transform: translateY(-2px);
}

.all-products-section {
    margin-top: 60px;
}

.all-products-section h3 {
    margin-bottom: 20px;
}


/* Contact Section */

.contact-section {
    padding: 80px 0;
    background: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 50px;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.contact-item {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-item i {
    font-size: 48px;
    color: #2c5530;
    margin-bottom: 20px;
}

.contact-item h4 {
    color: #2c5530;
    margin-bottom: 15px;
    font-size: 18px;
}

.contact-item p {
    color: #666;
    line-height: 1.6;
}

.contact-form {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 10px;
}

.contact-form h3 {
    color: #2c5530;
    margin-bottom: 30px;
    text-align: center;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    margin-bottom: 20px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #2c5530;
}

.contact-form button {
    width: 100%;
    padding: 15px;
    background: #2c5530;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.contact-form button:hover {
    background: #1e3a21;
}


/* Products */

.featured-products,
.new-arrivals {
    padding: 80px 0;
    background: #f8f9fa;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.product-badge.new {
    background: #27ae60;
}

.product-badge.sale {
    background: #f39c12;
}

.stock-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.stock-status.in-stock {
    background: rgba(39, 174, 96, 0.9);
}

.stock-status.low-stock {
    background: rgba(243, 156, 18, 0.9);
    animation: pulse 2s infinite;
}

.stock-status.out-of-stock {
    background: rgba(231, 76, 60, 0.9);
}

@keyframes pulse {
    0% {
        opacity: 0.9;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0.9;
    }
}


/* Out of stock product card styling */

.product-card:has(.stock-status.out-of-stock) {
    opacity: 0.6;
    filter: grayscale(20%);
}

.product-card:has(.stock-status.out-of-stock) .product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.product-card:has(.stock-status.out-of-stock) .add-to-cart-btn {
    background: #95a5a6 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.product-card:has(.stock-status.out-of-stock) .qty-btn {
    background: #bdc3c7 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.product-card:has(.stock-status.out-of-stock) .qty-input {
    background: #ecf0f1 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    color: #2c5530;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.product-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.price {
    font-size: 22px;
    color: #2c5530;
    font-weight: 700;
}

.original-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.qty-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    color: #666;
}

.qty-btn:hover {
    background: #f0f0f0;
}

.qty-input {
    border: none;
    width: 50px;
    text-align: center;
    padding: 8px 5px;
    font-size: 16px;
}

.add-to-cart-btn {
    background: #2c5530;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    flex: 1;
}

.add-to-cart-btn:hover {
    background: #1e3a21;
}

.add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}


/* Services */

.services {
    padding: 80px 0;
    background: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.service-card {
    text-align: center;
    padding: 30px 20px;
}

.service-card i {
    font-size: 48px;
    color: #2c5530;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}


/* Footer */

.footer {
    background: #2c5530;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section h3 {
    font-size: 24px;
}

.footer-section p {
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: white;
}

.social-links a {
    color: white;
    font-size: 24px;
    margin-right: 15px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #4CAF50;
}

.contact-info p {
    margin-bottom: 10px;
}

.contact-info i {
    margin-right: 10px;
    width: 20px;
}

.opening-hours p {
    margin-bottom: 5px;
}

.footer-bottom {
    border-top: 1px solid #4a6b4d;
    padding-top: 20px;
    text-align: center;
    color: #ccc;
}


/* Cart Sidebar */

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    color: #2c5530;
    font-size: 20px;
}

.close-cart {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    color: #999;
    padding: 50px 20px;
}

.empty-cart i {
    font-size: 48px;
    margin-bottom: 15px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.cart-item-price {
    color: #2c5530;
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.cart-item-quantity button {
    background: #f0f0f0;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.cart-item-quantity span {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.remove-item {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-total {
    font-size: 20px;
    font-weight: 700;
    color: #2c5530;
    margin-bottom: 15px;
    text-align: center;
}

.checkout-btn {
    width: 100%;
    background: #2c5530;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.checkout-btn:hover {
    background: #1e3a21;
}


/* Modal */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2c5530;
    font-size: 22px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}


/* Checkout Modal Styles */

.checkout-modal {
    max-width: 800px !important;
    max-height: 90vh;
    overflow-y: auto;
}

.checkout-content {
    padding: 20px;
}

.order-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.order-summary h4 {
    color: #2c5530;
    margin-bottom: 15px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-items {
    margin-bottom: 15px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.checkout-item:last-child {
    border-bottom: none;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.item-details {
    font-size: 14px;
    color: #666;
}

.item-total {
    font-weight: 600;
    color: #2c5530;
}

.order-total {
    border-top: 2px solid #2c5530;
    padding-top: 15px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 16px;
}

.total-final {
    font-weight: 600;
    font-size: 18px;
    color: #2c5530;
    border-top: 1px solid #e9ecef;
    padding-top: 10px;
    margin-top: 10px;
}

.delivery-section,
.payment-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.delivery-section h4,
.payment-section h4 {
    color: #2c5530;
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.address-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.address-search-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.3s;
}

.address-search-btn:hover {
    background: #5a6268;
}

.payment-methods {
    margin-bottom: 20px;
}

.payment-option {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-option:hover {
    border-color: #2c5530;
    background: #f8f9fa;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-option input[type="radio"]:checked+label {
    color: #2c5530;
}

.payment-option input[type="radio"]:checked {
    &~* {
        border-color: #2c5530;
    }
}

.payment-option.selected {
    border-color: #2c5530;
    background: #f8f9fa;
}

.payment-option label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin: 0;
    width: 100%;
}

.payment-option label i {
    font-size: 20px;
    color: #2c5530;
}

.payment-option label span {
    font-weight: 500;
    font-size: 16px;
}

.payment-option label small {
    color: #666;
    font-size: 14px;
    margin-left: auto;
}

.card-payment-form {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.cod-payment-info {
    background: #e7f3ff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #b3d9ff;
}

.cod-info-box {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.cod-info-box i {
    color: #0066cc;
    font-size: 24px;
    margin-top: 5px;
}

.cod-info-box h5 {
    color: #0066cc;
    margin-bottom: 10px;
}

.cod-info-box p {
    margin-bottom: 5px;
    color: #333;
}

.checkout-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    background: #fff;
    position: sticky;
    bottom: 0;
    z-index: 10;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}

.checkout-submit {
    background: linear-gradient(135deg, #2c5530 0%, #4a7c59 100%) !important;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
}

.checkout-submit:hover {
    background: linear-gradient(135deg, #1e3a21 0%, #2c5530 100%) !important;
    transform: translateY(-2px);
}


/* Card input styling */

#cardNumber,
#expiryDate,
#cvc {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}


/* Real Stripe Payment Styles */

.stripe-payment-notice {
    background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.stripe-payment-notice i {
    margin-right: 8px;
    font-size: 18px;
}

.stripe-payment-notice p {
    margin: 5px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

.stripe-card-input {
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    padding: 12px;
    background: white;
    transition: border-color 0.3s;
}

.stripe-card-input:focus-within {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.stripe-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 8px;
    display: block;
    min-height: 20px;
}

.payment-security-info {
    margin-top: 20px;
    text-align: center;
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.security-badges img {
    height: 20px;
    border-radius: 3px;
}

.payment-security-info p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.payment-security-info i {
    color: #28a745;
    margin-right: 5px;
}


/* Real payment success styling */

.real-payment-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

.payment-simulation-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    border: 2px solid #fd7e14;
}


/* Korean Payment Methods Styling */

.bank-transfer-info,
.kakaopay-info {
    background: #e8f5e8;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #4caf50;
    margin-top: 15px;
}

.bank-info-box,
.kakaopay-info-box {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.bank-info-box i,
.kakaopay-info-box i {
    color: #2c5530;
    font-size: 24px;
    margin-top: 5px;
}

.bank-details {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    border-left: 4px solid #2c5530;
}

.bank-details p {
    margin: 8px 0;
    font-size: 16px;
}

.bank-details strong {
    color: #2c5530;
    font-weight: 600;
}

.transfer-instructions {
    margin-top: 15px;
}

.transfer-instructions h6 {
    color: #2c5530;
    margin-bottom: 10px;
    font-weight: 600;
}

.transfer-instructions ol {
    margin: 10px 0;
    padding-left: 20px;
}

.transfer-instructions ol li {
    margin: 8px 0;
    line-height: 1.5;
}

.fee-notice {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    border: 1px solid #c3e6cb;
    font-weight: 500;
}

.deadline-notice {
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    border: 1px solid #ffeaa7;
}

.kakaopay-info {
    background: #fff8e1;
    border: 1px solid #ffcc02;
}

.kakaopay-benefits h6 {
    color: #2c5530;
    margin: 15px 0 10px 0;
    font-weight: 600;
}

.kakaopay-benefits ul {
    margin: 10px 0;
    padding-left: 20px;
}

.kakaopay-benefits ul li {
    margin: 8px 0;
    line-height: 1.5;
}

.kakaopay-notice {
    background: #e3f2fd;
    color: #0d47a1;
    padding: 10px;
    border-radius: 4px;
    margin: 15px 0;
    border: 1px solid #bbdefb;
    text-align: center;
}


/* Payment option icons */

.payment-option label i.fab.fa-kickstarter-k {
    color: #ffcc02;
}

.payment-option label i.fas.fa-university {
    color: #2c5530;
}


/* Mobile responsive for checkout */

@media (max-width: 768px) {
    .checkout-modal {
        max-width: 95% !important;
        margin: 10px;
    }
    .checkout-content {
        padding: 15px;
    }
    .address-row {
        flex-direction: column;
        gap: 10px;
    }
    .address-search-btn {
        width: 100%;
    }
    .checkout-actions {
        flex-direction: column-reverse;
    }
    .checkout-actions button {
        width: 100%;
    }
    .total-row {
        font-size: 14px;
    }
    .total-final {
        font-size: 16px;
    }
}


/* Loading */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 4000;
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2c5530;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-menu-toggle {
    display: none;
    /* Hidden by default on desktop */
    background: none;
    border: none;
    font-size: 24px;
    color: #2c5530;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: #f0f8f0;
}

.mobile-menu-toggle.active {
    background: #2c5530;
    color: white;
}


/* Hide mobile menu toggle on desktop */

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    .main-nav .nav-menu {
        display: flex !important;
        position: static;
        flex-direction: row;
        background: transparent;
        box-shadow: none;
        max-height: none;
        overflow: visible;
    }
}


/* Responsive Design */

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    .container-custom {
        padding: 0 15px;
    }
    /* Top bar adjustments for mobile */
    .top-bar {
        padding: 5px 0;
        font-size: 12px;
    }
    .top-bar .container-custom {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    .contact-info {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .contact-info span {
        margin-right: 0;
        font-size: 11px;
    }
    .top-links {
        display: none;
    }
    /* Navbar mobile adjustments */
    .navbar {
        padding: 12px 0;
    }
    .navbar .container-custom {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 15px;
    }
    .nav-brand {
        flex: 1;
    }
    .nav-brand .logo {
        width: 70px;
        height: 35px;
    }
    .nav-brand h1 {
        font-size: 22px;
    }
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .mobile-menu-toggle {
        display: block !important;
        font-size: 22px;
        padding: 8px;
    }
    .cart-btn {
        font-size: 14px;
        padding: 10px 12px;
        gap: 6px;
    }
    .cart-btn span:last-child {
        display: none;
    }
    .search-bar {
        order: 3;
        width: 100%;
        margin: 10px 0 0 0;
        max-width: none;
    }
    .search-bar input {
        padding: 12px 45px 12px 16px;
        font-size: 14px;
    }
    .search-btn {
        padding: 8px 12px;
    }
    /* Main navigation mobile */
    .main-nav {
        position: relative;
        padding: 0;
        background: white;
        border-top: 1px solid #eee;
        display: block;
    }
    .nav-menu {
        flex-direction: column;
        background: white;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
        display: none;
        z-index: 1000;
        max-height: 70vh;
        overflow-y: auto;
        border-radius: 0 0 10px 10px;
    }
    .main-nav.show .nav-menu {
        display: flex !important;
    }
    .nav-menu li {
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
    }
    .nav-menu li:last-child {
        border-bottom: none;
    }
    .nav-menu a {
        padding: 16px 20px;
        display: block;
        color: #333;
        border-left: 4px solid transparent;
        transition: all 0.3s ease;
        background: transparent;
        border-radius: 0;
        font-size: 15px;
        font-weight: 500;
    }
    /* Mobile dropdown toggle styling */
    .dropdown>a {
        position: relative;
    }
    .dropdown>a:after {
        content: '';
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 5px solid #666;
        transition: transform 0.3s ease;
    }
    .dropdown.active>a:after {
        transform: translateY(-50%) rotate(180deg);
    }
    /* Dropdown mobile adjustments */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: #f0f8f0;
        display: none;
        border-radius: 0;
        border: none;
        margin: 0;
        max-height: none;
        z-index: 1001;
    }
    .dropdown.active .dropdown-menu {
        display: block !important;
        animation: slideDown 0.3s ease-out;
    }
    /* Disable hover on mobile, only use click */
    .dropdown:hover .dropdown-menu {
        display: none !important;
    }
    .dropdown.active:hover .dropdown-menu {
        display: block !important;
    }
    .dropdown-menu a {
        padding: 14px 40px;
        font-size: 14px;
        border-left: 4px solid transparent;
        background: #f0f8f0;
    }
    .dropdown-menu a:hover {
        background: #e9ecef;
        border-left-color: #2c5530;
        padding-left: 44px;
    }
}

.nav-menu a:hover {
    background: #f8f9fa;
    border-left-color: #2c5530;
    color: #2c5530;
    transform: none;
    box-shadow: none;
    padding-left: 24px;
}


/* Animation for mobile dropdown */

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 300px;
    }
}


/* Hero section mobile */

.hero {
    flex-direction: column;
    text-align: center;
    padding: 120px 0 40px;
    background-attachment: scroll;
    min-height: 60vh;
}

.hero-content {
    padding-right: 0;
    margin-bottom: 30px;
}

.hero-content h2 {
    font-size: 28px;
}

.hero-content p {
    font-size: 16px;
}


/* Contact section mobile */

.contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
}

.contact-info {
    grid-template-columns: 1fr;
    gap: 20px;
}

.form-row {
    grid-template-columns: 1fr;
    gap: 0;
}

.contact-form {
    padding: 30px 20px;
}

.section-title {
    font-size: 28px;
}

.category-grid,
.products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
}

.services-grid {
    grid-template-columns: 1fr;
    gap: 30px;
}

.footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (max-width: 480px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    .cart-sidebar.open {
        right: 0;
    }
}

@media (max-width: 480px) {
    .top-bar {
        display: none;
    }
    .navbar {
        padding: 8px 0;
    }
    .navbar .container-custom {
        gap: 8px;
    }
    .nav-brand .logo {
        width: 50px;
        height: 25px;
    }
    .nav-brand h1 {
        font-size: 18px;
    }
    .nav-actions {
        gap: 8px;
    }
    .search-bar {
        margin: 8px 0 0 0;
    }
    .search-bar input {
        padding: 8px 35px 8px 12px;
        font-size: 13px;
    }
    .search-btn {
        padding: 6px 12px;
        right: 3px;
    }
    .mobile-menu-toggle {
        font-size: 20px;
        padding: 8px;
    }
    .cart-btn {
        font-size: 12px;
        padding: 6px;
    }
    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 10px;
        top: 3px;
        right: 3px;
    }
    .hero {
        padding: 100px 0 30px;
        min-height: 50vh;
    }
    .hero-content h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    .hero-content p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    .cta-btn {
        padding: 12px 24px;
        font-size: 16px;
    }
    .section-title {
        font-size: 24px;
    }
    .product-actions {
        flex-direction: column;
        gap: 10px;
    }
    .quantity-controls {
        align-self: stretch;
    }
    .nav-menu a {
        padding: 12px 15px;
        font-size: 14px;
    }
    .dropdown-menu a {
        padding: 10px 30px;
        font-size: 13px;
    }
}