/* ============================================
   Claire Design - Style Clean
   ============================================ */

:root {
    --primary: #C8A97E;
    --primary-dark: #B08C5F;
    --primary-light: #F5EDE3;
    --dark: #1A1A1A;
    --gray: #6B6B6B;
    --gray-light: #E5E5E5;
    --white: #FFFFFF;
    --danger: #E74C3C;
    --success: #27AE60;
    --warning: #F39C12;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --radius: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: var(--font-body);
    color: #2C2C2C;
    background: #FAFAFA;
    line-height: 1.6;
    font-size: 15px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.site-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.header-top {
    background: var(--dark);
    color: var(--white);
    padding: 6px 0;
    font-size: 12px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.header-main {
    padding: 12px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    flex-wrap: wrap;
}

.main-nav a {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}

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

.panier-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero */
.hero {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
}

.hero-image {
    position: absolute;
    inset: 0;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 500px;
}

.hero-subtitle {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary);
    margin-bottom: 10px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 36px;
    line-height: 1.1;
    margin-bottom: 15px;
}

.hero-text {
    font-size: 15px;
    opacity: 0.9;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-sm { padding: 6px 15px; font-size: 12px; }
.btn-lg { padding: 14px 30px; font-size: 14px; }
.btn-block { width: 100%; }

/* Sections */
.section {
    padding: 50px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-tag {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary);
    margin-bottom: 8px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--dark);
}

/* PRODUCTS GRID - 4 columns desktop, 2 columns mobile */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.product-image {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--primary-light);
}

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger);
    color: var(--white);
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 3px;
}

.product-info {
    padding: 12px;
}

.product-category {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 4px;
}

.product-name {
    font-family: var(--font-heading);
    font-size: 15px;
    margin-bottom: 8px;
}

.price {
    font-size: 15px;
    font-weight: 700;
}

.price-old {
    font-size: 12px;
    text-decoration: line-through;
    color: var(--gray);
    margin-left: 8px;
}

/* CATEGORIES GRID */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.category-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
    color: var(--white);
}

.category-name {
    font-family: var(--font-heading);
    font-size: 16px;
}

.category-count {
    font-size: 12px;
    opacity: 0.8;
}

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px 0;
}

.product-main-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 3/4;
    background: var(--primary-light);
}

.product-meta h1 {
    font-family: var(--font-heading);
    font-size: 26px;
    margin-bottom: 10px;
}

.product-description {
    color: var(--gray);
    margin: 20px 0;
    line-height: 1.8;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    overflow: hidden;
    width: fit-content;
}

.quantity-selector button {
    width: 35px;
    height: 35px;
    border: none;
    background: var(--white);
    cursor: pointer;
    font-size: 16px;
}

.quantity-selector input {
    width: 45px;
    height: 35px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

/* Cart */
.cart-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    text-align: left;
    padding: 10px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--gray);
    border-bottom: 1px solid var(--gray-light);
}

.cart-table td {
    padding: 10px;
    border-bottom: 1px solid var(--gray-light);
}

.cart-summary {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
}

/* Alerts */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-success { background: #d4edda; color: #155724; }
.alert-danger { background: #f8d7da; color: #721c24; }
.alert-warning { background: #fff3cd; color: #856404; }

/* Footer */
.site-footer {
    background: var(--dark);
    color: var(--white);
    padding: 50px 0 0;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
}

.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }

/* Auth */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--white);
    padding: 35px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* ============================================
   MOBILE - 2 columns for products & categories
   ============================================ */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .hero {
        height: 300px;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-text {
        display: none;
    }

    .main-nav ul {
        gap: 10px;
    }

    .main-nav a {
        font-size: 11px;
    }

    .product-name {
        font-size: 13px;
    }

    .price {
        font-size: 13px;
    }

    .section-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        gap: 8px;
    }

    .categories-grid {
        gap: 8px;
    }

    .product-info {
        padding: 8px;
    }

    .product-name {
        font-size: 12px;
    }

    .logo {
        font-size: 18px;
    }

    .header-main .container {
        justify-content: center;
        text-align: center;
    }
}

/* Product Image - parent must be relative for absolute positioning of buttons */
.product-image {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--primary-light);
    display: block;
}

/* Eye icon - View product button */
.product-view-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s;
    z-index: 5;
    opacity: 0;
}

/* Cart button */
.product-cart-form {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 5;
    opacity: 0;
    transition: all 0.3s;
}

.product-cart-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.product-cart-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.product-view-btn:hover {
    background: var(--dark);
    color: var(--white);
    transform: scale(1.1);
}

/* Show buttons on hover (desktop) */
.product-card:hover .product-view-btn,
.product-card:hover .product-cart-form {
    opacity: 1;
}

/* Always show on mobile/touch devices */
@media (hover: none) and (pointer: coarse), (max-width: 768px) {
    .product-view-btn,
    .product-cart-form {
        opacity: 1;
    }
}
