:root {
    --primary-color: #39888D;
    --secondary-color: #F1B98C;
    --accent-color: #F39F7E;
    --dark-accent: #D95C59;
    --light-accent: #F0A7A5;
    --white: #ffffff;
    --dark: #2c3e50;
    --bg-light: #FBFBFA;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --shadow: 0 10px 30px rgba(57, 136, 141, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -1px;
}

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

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

.nav-link {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(57, 136, 141, 0.05);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.cart-count {
    background-color: var(--accent-color);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 5px;
}

.admin-btn {
    background-color: var(--dark-accent) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(217, 92, 89, 0.2);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    position: relative;
    background: linear-gradient(135deg, #39888D 0%, #2a666a 100%);
    color: white;
    padding: 7rem 0;
    text-align: center;
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero::after {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: var(--secondary-color);
    filter: blur(100px);
    opacity: 0.15;
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    letter-spacing: -1.5px;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(243, 159, 126, 0.2);
}

.btn-primary:hover {
    background-color: var(--dark-accent);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(217, 92, 89, 0.3);
}

.btn-block {
    width: 100%;
}

/* Products Grid */
.products-section {
    padding: 4rem 0;
}

.products-section h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 3rem;
    color: var(--dark);
}

.filter-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    justify-content: flex-start;
}

/* Search + Faceted filters (centered) */
.search-filters {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.search-bar {
    width: 100%;
    max-width: 820px;
}
.search-bar input[type="search"] {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    border: 1px solid #eee;
    font-size: 1rem;
    box-shadow: var(--shadow);
}
.faceted-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}
.availability-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    background: white;
    border: 1px solid #eee;
    font-weight: 600;
    color: var(--dark);
}

.filter-select {
    padding: 0.8rem 1.2rem;
    border: 1px solid #eee;
    border-radius: 12px;
    background-color: white;
    font-weight: 600;
    color: var(--dark);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.02);
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.product-info {
    padding: 1.8rem;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

/* Recommendations */
.recommendations-section {
    margin-top: 3rem;
}
.recommendations-section h3 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
}
.products-grid.recommendations, .recommendations-section .products-grid {
    margin-top: 0.5rem;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Auth Pages */
.auth-section {
    padding: 6rem 0;
    background: radial-gradient(circle at top right, var(--light-accent), transparent 40%);
}

.auth-container {
    max-width: 440px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.05);
    border: 1px solid white;
}

.auth-tabs {
    display: flex;
    background: #f1f3f5;
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 2.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.8rem;
    border: none;
    background: transparent;
    font-weight: 700;
    color: var(--gray-color);
    cursor: pointer;
    border-radius: 10px;
    transition: var(--transition);
}

.tab-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #f1f1f1;
    border-radius: 14px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 45px;
    cursor: pointer;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: white;
    padding: 5rem 0 2rem;
    margin-top: 6rem;
}

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

.footer-section h3, .footer-section h4 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.footer-section a {
    display: block;
    color: #cbd5e0;
    text-decoration: none;
    margin-bottom: 0.8rem;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: #718096;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.5rem; }
    .footer-content { grid-template-columns: 1fr; gap: 2.5rem; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: white;
        padding: 2rem;
        flex-direction: column;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    .nav-menu.active { display: flex; }
    .menu-toggle { display: block; }
}

/* Product Detail Visual */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: var(--white);
    border-radius: 32px;
    padding: 3rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

/* Image Gallery Styles */
.main-image {
    width: 100%;
    aspect-ratio: 1/1;
    background: #f8f9fa;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.03);
}

.main-image img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    cursor: pointer;
    border: 2px solid transparent;
    background: #f8f9fa;
    transition: var(--transition);
}

.thumbnail.active {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(57, 136, 141, 0.2);
}

/* Quantity & CTA Section */
.quantity-controls {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    width: fit-content;
    border-radius: 16px;
    padding: 6px;
    margin-top: 1rem;
}

.quantity-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
}

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

#quantity {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Primary Action Buttons */
.btn-primary {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    border-radius: 18px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(243, 159, 126, 0.2);
    /* display: flex; */
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-primary:hover {
    background-color: var(--dark-accent);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(217, 92, 89, 0.3);
}

/* Mobile */
@media (max-width: 850px) {
    .product-detail {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 2rem;
    }
}

/* Order History */
.profile-section {
    padding: 4rem 0;
}

.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 1.5rem;
}

.orders-header h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
}

/* Order Card */
.order-card {
    background: white;
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--shadow); 
    overflow: hidden;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.order-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(57, 136, 141, 0.12);
}

.order-card__header {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

/* Status Badge */
.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-success { color: #27ae60; background: #e8f5e9; }
.status-warning { color: #f39c12; background: #fef5e7; }
.status-info { color: #3498db; background: #ebf5fb; }
.status-danger { color: #e74c3c; background: #fdedec; }

/* Grid layout for order details */
.order-card__body {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.order-items {
    border-left: 1px solid #eee;
    padding-left: 2rem;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px dashed #eee;
}

/* Receipt Upload Interactive Zone */
.order-card__footer {
    padding: 1.5rem 2rem;
    background: #fffaf5;
    border-top: 1px solid #fee2d5;
}

.receipt-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    background: white;
    padding: 0.8rem;
    border-radius: 16px;
    border: 2px dashed var(--secondary-color); 
}

.upload-receipt-btn {
    background-color: var(--accent-color); 
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

/* Responsive */
@media (max-width: 768px) {
    .order-card__body {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .order-items {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #eee;
        padding-top: 1.5rem;
    }
}

/* Receipt Preview Styles */
.receipt-preview-container {
    margin: 1rem 0;
    display: none;
    position: relative;
    max-width: 200px;
    animation: fadeIn 0.3s ease;
}

.receipt-preview-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--secondary-color);
    box-shadow: var(--shadow);
}

.receipt-preview-img {
    width: 100%;
    display: block;
    height: auto;
    object-fit: cover;
}

.remove-preview-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--dark-accent);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: var(--transition);
    z-index: 10;
}

.remove-preview-btn:hover {
    transform: scale(1.1);
    background: #c0392b;
}

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