/* ========================================
   CLEMTEC - Design Moderne & Responsive
   Ultra-Modern & Mobile-First
   ======================================== */

/* ========== ROOT & VARIABLES ========== */
:root {
    --primary: #000;
    --secondary: #fff;
    --accent: #000000;
    --accent-dark: #000000;
    --text: #1a1a1a;
    --text-light: #666;
    --bg: #f8f8f8;
    --border: #e0e0e0;
    --gray-light: #fafafa;
    --gray-medium: #eee;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --navbar-height: 70px;
    --font-main: 'Montserrat', Arial, sans-serif;
}

/* ========== RESET ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

/* ========== PAGE TRANSITIONS ========== */
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(6px); filter: blur(2px); }
    to { opacity: 1; transform: none; filter: none; }
}

@keyframes pageFadeOut {
    from { opacity: 1; transform: none; filter: none; }
    to { opacity: 0; transform: translateY(4px); filter: blur(1px); }
}

body.page-enter {
    animation: pageFadeIn 220ms ease both;
}

body.page-exit {
    animation: pageFadeOut 180ms ease forwards;
}
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--secondary);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Smooth scrollbar styling for webkit browsers */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dark);
}

/* ========== TYPOGRAPHIE ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 2rem;
    letter-spacing: -0.3px;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

a {
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

/* ========== NAVBAR ========== */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    height: var(--navbar-height);
    display: flex;
    align-items: center;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    z-index: 1001;
    letter-spacing: -0.01em;
}

.navbar-logo {
    height: 45px;
    width: auto;
    transition: var(--transition);
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.05);
}

.navbar-brand:hover {
    color: #2a2a2a;
}

/* Hamburger Menu Button */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.navbar-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.navbar-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.navbar-nav a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    white-space: nowrap;
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.navbar-nav a:hover::after {
    width: 100%;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--primary);
    color: white;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0 5px;
}

.cart-link {
    position: relative;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .navbar-toggle {
        display: flex;
    }
    
    .navbar-nav {
        position: fixed;
        top: var(--navbar-height);
        right: -100%;
        width: 280px;
        max-width: 85vw;
        height: calc(100vh - var(--navbar-height));
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 0;
        padding: 2rem 0;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }
    
    .navbar-nav.active {
        right: 0;
    }
    
    .navbar-nav li {
        width: 100%;
    }
    
    .navbar-nav a {
        display: block;
        width: 100%;
        padding: 1rem 2rem;
        text-align: left;
    }
    
    .navbar-nav button {
        width: 100%;
        justify-content: flex-start;
    }
    
    .navbar-nav a::after {
        bottom: 0.5rem;
    }
    
    #auth-nav {
        width: 100%;
        flex-direction: column !important;
        gap: 0 !important;
    }
    
    #auth-nav button,
    #auth-nav a {
        width: 100%;
        margin: 0 !important;
        justify-content: flex-start;
    }
}

/* ========== HERO SECTION ========== */
.hero {
    background: #ffffff;
    padding: clamp(4rem, 12vw, 10rem) 2rem clamp(3rem, 10vw, 8rem);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(0, 0, 0, 0.02) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    margin-bottom: 1.5rem;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--primary);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    animation: slideDown 0.6s ease-out;
}

.hero p {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--text-light);
    margin-bottom: 2.5rem;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: slideUp 0.6s ease-out 0.2s both;
}

.cta-button {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 1.1rem 2.8rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.6s ease-out 0.4s both;
    letter-spacing: 0.01em;
}

.cta-button:hover {
    background: #2a2a2a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.cta-button:active {
    transform: translateY(0);
}

/* ========== BUTTON BASE (UNIFORM) ========== */
.btn,
.btn-submit,
.btn-send,
.btn-logout,
.btn-logout-admin,
.admin-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: none;
    background: var(--primary);
    color: white !important;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    white-space: nowrap;
}

.btn:hover,
.btn-submit:hover,
.btn-send:hover,
.btn-logout:hover,
.btn-logout-admin:hover,
.admin-nav-btn:hover {
    background: #2a2a2a;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active,
.btn-submit:active,
.btn-send:active {
    transform: translateY(0);
}

.btn.secondary,
.btn-secondary,
.btn-logout-admin.secondary {
    background: #333333;
    color: #ffffff !important;
    border: 1px solid #333333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn.secondary:hover,
.btn-secondary:hover {
    background: #555555;
    color: #ffffff !important;
    border-color: #555555;
}

.admin-nav-btn {
    width: 100%;
    text-align: left;
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    background: transparent;
    color: var(--text-light);
    box-shadow: none;
}

.admin-nav-btn.active {
    background: rgba(0, 0, 0, 0.08);
    color: var(--primary);
}

/* Auth tabs - only for navbar context */
.navbar .auth-tab {
    background: transparent;
    color: var(--text-light);
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    box-shadow: none;
}

.navbar .auth-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ========== FEATURES ========== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 2rem;
    margin-top: 0;
    padding: clamp(3rem, 8vw, 5rem) clamp(1rem, 5vw, 2rem);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    background: #fafafa;
}

.feature-card {
    background: var(--secondary);
    padding: clamp(2rem, 5vw, 2.5rem);
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    border-color: #e0e0e0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.feature-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-light);
    font-size: clamp(0.95rem, 2vw, 1rem);
    line-height: 1.7;
}

@media (max-width: 640px) {
    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 1rem;
    }
}

/* ========== PRODUITS - GRID ========== */
.products-section {
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 clamp(1rem, 5vw, 2rem);
    background: white;
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 3rem;
    text-align: center;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
}

@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr));
        gap: 1rem;
    }
}

.product-card {
    background: var(--secondary);
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    border-color: #e0e0e0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.product-image {
    width: 100%;
    height: clamp(200px, 30vw, 250px);
    object-fit: cover;
    background: #fafafa;
    position: relative;
    z-index: 2;
}

.product-info {
    padding: clamp(1rem, 3vw, 1.5rem);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.product-name {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-description {
    font-size: clamp(0.85rem, 2vw, 0.9rem);
    color: var(--text-light);
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f5f5f5;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-price {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--primary);
}

.stock-status {
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.in-stock {
    background: #f0f9f0;
    color: #2e7d32;
}

.limited-stock {
    background: #fff8e6;
    color: #e65100;
}

/* ========== PRODUCT DETAIL ========== */
.product-detail {
    max-width: 1200px;
    margin: 3rem auto;
    padding: clamp(1rem, 5vw, 2rem);
}

.detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

@media (max-width: 968px) {
    .detail-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    /* Prevent gallery from overlapping content on mobile */
    .gallery {
        position: static;
        top: auto;
    }
}

.gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    width: 100%;
    height: clamp(300px, 50vw, 500px);
    object-fit: cover;
    border-radius: 12px;
    background: var(--gray-light);
    box-shadow: var(--shadow-md);
}

.thumbnails {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.thumbnail {
    width: clamp(60px, 15vw, 80px);
    height: clamp(60px, 15vw, 80px);
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: var(--transition);
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--accent);
    transform: scale(1.05);
}

.detail-info h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.detail-price {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.specifications {
    background: var(--gray-light);
    padding: clamp(1rem, 3vw, 1.5rem);
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.specification-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
    flex-wrap: wrap;
}

.specification-item:last-child {
    border-bottom: none;
}

.spec-label {
    color: var(--text-light);
    font-weight: 500;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.spec-value {
    font-weight: 600;
    color: var(--primary);
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.color-selector {
    margin-bottom: 2rem;
}

.color-selector h3 {
    margin-bottom: 1rem;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
}

.colors {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.color-option {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: var(--secondary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.color-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.color-option.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.quantity-selector label {
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--secondary);
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-light);
    cursor: pointer;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
    transition: var(--transition);
}

.quantity-btn:hover {
    background: var(--primary);
    color: white;
}

.quantity-input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    background: transparent;
}

.add-to-cart {
    width: 100%;
    padding: clamp(1rem, 3vw, 1.2rem);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.add-to-cart:hover {
    background: #2a2a2a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.add-to-cart:active {
    transform: translateY(-1px);
}

.description {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.description h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    margin-bottom: 1rem;
}

.description p {
    line-height: 1.8;
    font-size: clamp(0.95rem, 2vw, 1rem);
}

/* ========== SHOPPING CART ========== */
.cart-section {
    max-width: 1000px;
    margin: 3rem auto;
    padding: clamp(1rem, 5vw, 2rem);
}

.cart-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.cart-empty h2 {
    margin-bottom: 1rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.cart-items {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.cart-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: clamp(1rem, 3vw, 2rem);
    padding: clamp(1rem, 3vw, 1.5rem);
    border-bottom: 1px solid var(--border);
    align-items: center;
}

@media (max-width: 640px) {
    .cart-item {
        grid-template-columns: auto 1fr;
        gap: 1rem;
    }
    
    .cart-item-details {
        grid-column: 1 / -1;
    }
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: clamp(80px, 20vw, 120px);
    height: clamp(80px, 20vw, 120px);
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-details h3 {
    margin-bottom: 0.5rem;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
}

.cart-item-info {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: clamp(0.85rem, 2vw, 0.9rem);
    color: var(--text-light);
    flex-wrap: wrap;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
}

.remove-btn {
    background: #000000;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    color: #ffffff !important;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.remove-btn:hover {
    background: #333333;
    color: #ffffff !important;
}

.cart-summary {
    background: linear-gradient(135deg, var(--gray-light), var(--secondary));
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: clamp(0.95rem, 2vw, 1rem);
}

.summary-row.total {
    border-top: 2px solid var(--border);
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    font-weight: 700;
    color: var(--primary);
}

.checkout-btn {
    width: 100%;
    padding: clamp(1rem, 3vw, 1.2rem);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: clamp(0.95rem, 2vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.checkout-btn:hover {
    background: #2a2a2a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ========== FORM & INPUTS ========== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.form-group input,
    .form-group textarea,
    .form-group select {
    width: 100%;
    padding: clamp(0.65rem, 2vw, 0.75rem);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: var(--transition);
    background: var(--secondary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--secondary);
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 1.75rem);
}

.close-btn {
    background: var(--gray-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.close-btn:hover {
    background: var(--border);
    transform: rotate(90deg);
}

/* ========== ADMIN PANEL ========== */
.admin-panel {
    max-width: 1200px;
    margin: 2rem auto;
    padding: clamp(1rem, 5vw, 2rem);
}

.login-form {
    max-width: 400px;
    margin: 4rem auto;
    padding: clamp(1.5rem, 4vw, 2rem);
    background: var(--secondary);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: clamp(1.5rem, 3vw, 1.75rem);
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
}

.tab-button {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-button.active {
    color: var(--primary);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    overflow-x: auto;
    display: block;
}

@media (max-width: 768px) {
    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

.admin-table th {
    background: var(--gray-light);
    padding: clamp(0.75rem, 2vw, 1rem);
    text-align: left;
    font-weight: 600;
    color: var(--primary);
    border-bottom: 2px solid var(--border);
}

.admin-table td {
    padding: clamp(0.75rem, 2vw, 1rem);
    border-bottom: 1px solid var(--border);
}

.admin-table tr:hover {
    background: var(--gray-light);
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    font-weight: 600;
    white-space: nowrap;
}

.status-pending {
    background: #fff3e0;
    color: #e65100;
}

.status-processing {
    background: #e3f2fd;
    color: #1565c0;
}

.status-shipped {
    background: #f3e5f5;
    color: #7b1fa2;
}

.status-delivered {
    background: #e8f5e9;
    color: #2e7d32;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: clamp(0.8rem, 2vw, 0.85rem);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #2a2a2a;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #333333;
    color: #ffffff !important;
}

.btn-secondary:hover {
    background: #555555;
    color: #ffffff !important;
}

.btn-danger {
    background: #000000;
    color: #ffffff !important;
}

.btn-danger:hover {
    background: #333333;
    color: #ffffff !important;
}

/* ========== FOOTER ========== */
.footer {
    background: #000000;
    color: white;
    padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 5vw, 2rem);
    margin-top: 5rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: clamp(1.5rem, 4vw, 2rem);
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(0.85rem, 2vw, 0.9rem);
    line-height: 1.8;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/* ========== RESPONSIVE UTILITIES ========== */
@media (max-width: 1024px) {
    .main-image {
        height: 400px;
    }

    h1 {
        font-size: clamp(1.75rem, 4vw, 2rem);
    }
}

@media (max-width: 640px) {
    body {
        font-size: 15px;
    }
    
    .section-title {
        font-size: clamp(1.75rem, 5vw, 2rem);
        margin-bottom: 2rem;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-in-up {
    animation: slideUp 0.3s ease;
}

/* ========== UTILITIES ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-light);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
