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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f9f5;
    color: #2d4a2d;
}

/* Navigation */
.navbar {
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    font-size: 1.2rem;
}

.logo-icon {
    background-color: #2d5f2e;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.logo-text {
    color: #2d4a2d;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #2d4a2d;
    font-weight: 500;
    transition: color 0.3s;
    cursor: pointer;
}

.nav-menu a:hover {
    color: #4a8c4a;
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

.lang-btn, .cart-btn {
    background: none;
    border: 1px solid #e0e0e0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.lang-btn:hover, .cart-btn:hover {
    background-color: #f0f0f0;
}

/* Cart Counter Badge */
.cart-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: cartBounce 0.5s ease;
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.cart-counter.updated {
    animation: cartBounce 0.5s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f1 100%);
    padding: 4rem 2rem;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    color: #2d4a2d;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    color: #4a8c4a;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.hero-content p {
    color: #5a6a5a;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: #2d5f2e;
    color: white;
}

.btn-primary:hover {
    background-color: #234a24;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: white;
    color: #2d5f2e;
    border: 2px solid #2d5f2e;
}

.btn-secondary:hover {
    background-color: #f5f9f5;
}

/* Cart Management Buttons */
.quantity-btn:hover {
    background-color: #f0f0f0 !important;
    border-color: #2d5f2e !important;
}

.quantity-btn:active {
    transform: scale(0.95);
}

.remove-btn:hover {
    background-color: #b71c1c !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(211, 47, 47, 0.3);
}

.remove-btn:active {
    transform: translateY(0);
}

/* Cart table input styling */
.cart-container input[type="number"] {
    -moz-appearance: textfield;
}

.cart-container input[type="number"]::-webkit-outer-spin-button,
.cart-container input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-container input[type="number"]:focus {
    outline: 2px solid #2d5f2e;
    border-color: #2d5f2e;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-placeholder {
    width: 100%;
    max-width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #d4e4d4 0%, #e8f5e9 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

/* Collections Section */
.collections {
    padding: 4rem 2rem;
    background-color: white;
}

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

.section-header h2 {
    font-size: 2rem;
    color: #2d4a2d;
    margin-bottom: 1rem;
}

.section-header p {
    color: #5a6a5a;
    line-height: 1.6;
}

.products-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #e8f5e9 0%, #d4e4d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    overflow: hidden;
    position: relative;
}

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

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

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    color: #2d4a2d;
    margin-bottom: 0.5rem;
}

.product-info p {
    color: #5a6a5a;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 1.5rem;
    color: #2d5f2e;
    font-weight: bold;
}

.add-to-cart {
    background-color: #2d5f2e;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.add-to-cart:hover {
    background-color: #234a24;
}

.add-to-cart-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(45, 95, 46, 0.4) !important;
}

.add-to-cart-large:active {
    transform: translateY(0);
}

/* Product Detail Page */
.product-detail-container {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.back-button:hover {
    background-color: #e0e0e0 !important;
}

@media (max-width: 768px) {
    .product-detail-container > div {
        grid-template-columns: 1fr !important;
    }
    
    .product-detail-image {
        min-height: 300px !important;
    }
}

/* About Section */
.about {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f1 100%);
}

.about-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.about-container h2 {
    font-size: 2rem;
    color: #2d4a2d;
    margin-bottom: 1.5rem;
}

.about-container p {
    color: #5a6a5a;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    color: #2d4a2d;
    margin-bottom: 0.5rem;
}

.feature p {
    color: #5a6a5a;
    font-size: 0.9rem;
}

/* ==========================================
   RESPONSIVE - TABLET (max 1024px)
   ========================================== */
@media (max-width: 1024px) {
    .hero-container {
        gap: 2rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   RESPONSIVE - MOBILE (max 768px)
   ========================================== */
@media (max-width: 768px) {

    /* --- Navbar --- */
    .nav-container {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
        position: relative;
    }

    .nav-menu {
        order: 3;
        width: 100%;
        gap: 0;
        flex-wrap: wrap;
        justify-content: center;
        border-top: 1px solid #e0e0e0;
        padding-top: 0.5rem;
        padding-bottom: 0.25rem;
    }

    .nav-menu li a {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
        display: inline-block;
    }

    #auth-menu {
        order: 4;
        width: 100%;
        justify-content: center;
        border-top: none;
        padding-top: 0;
        gap: 0;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .lang-btn, .cart-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.9rem;
    }

    /* --- Hero --- */
    .hero {
        padding: 2.5rem 1rem;
        min-height: auto;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 320px;
    }

    .hero-image-placeholder {
        height: 250px;
        max-width: 280px;
        margin: 0 auto;
    }

    /* --- Products Grid --- */
    .collections {
        padding: 2.5rem 1rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 1.25rem;
    }

    .product-image {
        height: 220px;
    }

    /* --- Cart Table --- */
    .cart-container table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cart-container table thead {
        display: none;
    }

    .cart-container table tbody tr {
        display: block;
        border: 1px solid #eee;
        border-radius: 10px;
        margin-bottom: 1rem;
        padding: 1rem;
        background: white;
    }

    .cart-container table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.4rem 0;
        border-bottom: 1px solid #f5f5f5;
        font-size: 0.95rem;
    }

    .cart-container table td:last-child {
        border-bottom: none;
    }

    .cart-container table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #2d5f2e;
        margin-right: 1rem;
        min-width: 80px;
    }

    /* --- Checkout --- */
    .checkout-container > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* --- Product Detail --- */
    .product-detail-container > div {
        grid-template-columns: 1fr !important;
    }

    .product-detail-image {
        min-height: 280px !important;
    }

    /* --- About Features --- */
    .about {
        padding: 2.5rem 1rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* --- Auth --- */
    .auth-card {
        padding: 2rem 1.25rem;
        border-radius: 12px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* --- Section Headers --- */
    .section-header h2 {
        font-size: 1.6rem;
    }

    /* --- Gift Modal --- */
    .gift-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .gift-modal-header {
        padding: 1.25rem;
    }

    .gift-modal-header h2 {
        font-size: 1.4rem;
    }

    .gift-modal-body {
        padding: 1rem;
    }

    .gift-options-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   RESPONSIVE - SMALL MOBILE (max 480px)
   ========================================== */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.7rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .logo-text {
        font-size: 1rem;
    }

    .nav-menu li a {
        font-size: 0.85rem;
        padding: 0.35rem 0.5rem;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .auth-card {
        padding: 1.5rem 1rem;
    }

    .product-image {
        height: 200px;
    }
}
/* Auth Section */
.auth-section {
    min-height: calc(100vh - 100px);
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.auth-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.auth-header h2 {
    color: #2d4a2d;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #5a6a5a;
    font-size: 0.9rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    color: #2d4a2d;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #2d5f2e;
    box-shadow: 0 0 0 3px rgba(45, 95, 46, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #5a6a5a;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.link {
    color: #2d5f2e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.link:hover {
    color: #4a8c4a;
    text-decoration: underline;
}

.btn-full {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    color: #5a6a5a;
    font-size: 0.9rem;
}

.auth-footer p {
    margin: 0;
}

/* Responsive Auth */
@media (max-width: 768px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}


/* --- NEW: Shop Stock Styles --- */

/* The Layout for the grid (You likely need this if you haven't added it yet) */
.gift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* Card Styling enhancements */
.gift-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    position: relative; /* Essential for positioning the badge */
    transition: transform 0.2s;
    background: white;
}

.gift-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gift-image {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Task A2.2: Blurring sold out items */
.gift-card.sold-out {
    opacity: 0.6;              /* Make it see-through */
    pointer-events: none;      /* Disable all clicks */
    filter: grayscale(80%);    /* Make it greyish */
}

/* Task A2.3: The "Sold Out" Badge */
.badge-sold-out {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #d32f2f; /* Red */
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    z-index: 10;
}

/* Gave Status Bokse */
.gift-status-box {
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
}

.gift-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.gift-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ==========================================
   GIFT SELECTION MODAL STYLES
   ========================================== */

/* Modal Overlay */
.gift-modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}

.gift-modal.show {
    opacity: 1;
}

/* Modal Content Box */
.gift-modal-content {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.3s ease;
}

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

/* Modal Header */
.gift-modal-header {
    background: linear-gradient(135deg, #2d5f2e 0%, #4a8c4a 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.gift-modal-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

.gift-modal-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Close Button */
.gift-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.gift-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal Body */
.gift-modal-body {
    padding: 2rem;
}

/* Gift Options Grid */
.gift-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Individual Gift Option */
.gift-option {
    background: #f5f9f5;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gift-option:hover:not(.disabled) {
    border-color: #4a8c4a;
    box-shadow: 0 5px 15px rgba(74, 140, 74, 0.2);
    transform: translateY(-3px);
}

.gift-option.disabled {
    opacity: 0.5;
    filter: grayscale(80%);
}

/* Gift Option Image */
.gift-option-image {
    width: 100%;
    height: 180px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gift-option-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gift Option Info */
.gift-option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gift-option-info h3 {
    color: #2d4a2d;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.gift-option-info p {
    color: #5a6a5a;
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.gift-stock {
    font-weight: 600;
    color: #2d5f2e;
    margin-top: auto !important;
    margin-bottom: 1rem !important;
}

/* Select Gift Button */
.btn-select-gift {
    background: linear-gradient(135deg, #2d5f2e 0%, #4a8c4a 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: auto;
}

.btn-select-gift:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 95, 46, 0.3);
}

.btn-select-gift:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gift-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .gift-modal-header {
        padding: 1.5rem;
    }
    
    .gift-modal-header h2 {
        font-size: 1.5rem;
    }
    
    .gift-modal-body {
        padding: 1rem;
    }
    
    .gift-options-grid {
        grid-template-columns: 1fr;
    }
    
    /* Checkout responsive */
    .checkout-container > div {
        grid-template-columns: 1fr !important;
    }
    
    .order-summary {
        order: -1;
    }
}