/* =============================================================
   Lion Fashion — Folha de Estilos
   ============================================================= */

:root {
    --gold:        #C9A227;
    --gold-dark:   #9B7B1E;
    --gold-light:  #F5EDCA;
    --black:       #0A0A0A;
    --gray:        #666;
    --light:       #F8F9FA;
    --white:       #FFFFFF;
    --green:       #25D366;
    --green-dark:  #1DA850;
    --danger:      #E74C3C;
    --radius:      12px;
    --shadow:      0 2px 12px rgba(0,0,0,.08);
    --shadow-lg:   0 8px 32px rgba(0,0,0,.14);
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #FAFAF5;
    color: var(--black);
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* -------------------------------------------------------
   Header
------------------------------------------------------- */
.header {
    background: #000000;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 56px;
    width: auto;
    display: block;
}

.cart-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--gold);
    color: var(--black);
    text-decoration: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    transition: background .2s, color .2s;
}

.cart-btn:hover,
.cart-btn.active { background: var(--gold-dark); color: var(--white); }

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

.wa-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--green);
    color: #fff;
    text-decoration: none;
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    transition: background .2s;
    white-space: nowrap;
}

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

.badge {
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* -------------------------------------------------------
   Flash message
------------------------------------------------------- */
.flash {
    padding: 14px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    transition: opacity .5s;
}

.flash-success {
    background: #D4EDDA;
    color: #155724;
    border-bottom: 2px solid #C3E6CB;
}

.flash-error {
    background: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
    border-radius: var(--radius);
    margin: 16px 0;
    text-align: left;
    padding: 14px 18px;
}

.flash-error p { margin-bottom: 4px; }
.flash-error p:last-child { margin-bottom: 0; }

/* -------------------------------------------------------
   Hero
------------------------------------------------------- */
.hero {
    background: #000000;
    color: #fff;
    text-align: center;
    border-radius: 16px;
    padding: 40px 24px 36px;
    margin: 24px 0 28px;
}

.hero h1 {
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero h1 strong {
    color: var(--gold);
    font-size: 2.4rem;
    display: inline-block;
}

.hero p { color: #bbb; font-size: 15px; }

.hero-logo {
    width: 90px;
    height: auto;
    display: block;
    margin: 0 auto 16px;
}

/* -------------------------------------------------------
   Category Filters
------------------------------------------------------- */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.filter-btn {
    padding: 7px 16px;
    border-radius: 24px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid var(--gold);
    color: var(--gold-dark);
    background: #fff;
    transition: all .2s;
    white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active { background: var(--gold); color: var(--black); }

/* -------------------------------------------------------
   Product Grid
------------------------------------------------------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-icon {
    background: linear-gradient(135deg, var(--gold-light) 0%, #E8D49A 100%);
    font-size: 62px;
    text-align: center;
    padding: 26px 0;
    line-height: 1;
    user-select: none;
}

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

.product-info {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.product-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--gold-dark);
    font-weight: 700;
}

.product-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.product-desc {
    font-size: 12px;
    color: var(--gray);
    line-height: 1.45;
    flex: 1;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 10px;
    margin-top: 6px;
    border-top: 1px solid #f0f0f0;
}

.product-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--gold-dark);
}

/* -------------------------------------------------------
   Buttons
------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background .2s, color .2s, border-color .2s;
    font-family: inherit;
}

.btn-add {
    background: var(--black);
    color: var(--gold);
    padding: 8px 12px;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 8px;
}

.btn-add:hover { background: var(--gold); color: var(--black); }

.btn-primary { background: var(--gold); color: var(--black); }
.btn-primary:hover { background: var(--gold-dark); color: var(--white); }

.btn-outline {
    background: transparent;
    color: var(--gray);
    border: 2px solid #ddd;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold-dark); }

.btn-whatsapp { background: var(--green); color: #fff; font-size: 16px; padding: 14px 22px; }
.btn-whatsapp:hover { background: var(--green-dark); }

.btn-lg { font-size: 18px; padding: 16px 32px; border-radius: 12px; }
.btn-block { display: block; width: 100%; margin-bottom: 8px; }
.btn-link { background: transparent; color: var(--gold-dark); text-decoration: underline; }

.btn-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 16px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background .2s;
    font-family: inherit;
}
.btn-remove:hover { background: #fde8e8; }

/* -------------------------------------------------------
   Page Title
------------------------------------------------------- */
.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 28px 0 20px;
}

/* -------------------------------------------------------
   Cart
------------------------------------------------------- */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
    margin-bottom: 50px;
}

.cart-items {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.cart-header {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 16px;
    padding: 12px 20px;
    background: var(--gold-light);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--gold-dark);
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child { border-bottom: none; }

.cart-item-name { font-weight: 600; font-size: 14px; }

.cart-item-price {
    font-weight: 700;
    color: var(--gold-dark);
    white-space: nowrap;
}

/* Quantity controls */
.qty-form {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    background: var(--light);
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    padding: 6px 12px;
    transition: background .15s;
    color: var(--black);
    font-family: inherit;
    line-height: 1;
}

.qty-btn:hover { background: var(--gold-light); }

.qty-display {
    font-weight: 700;
    font-size: 15px;
    min-width: 34px;
    text-align: center;
}

/* Cart Summary */
.cart-summary {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}

.cart-summary h3 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gold-light);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.summary-total {
    border-top: 2px solid var(--gold);
    padding-top: 12px;
    margin-top: 8px;
    font-size: 16px;
}

.delivery-free { color: #155724; font-weight: 600; }

/* -------------------------------------------------------
   Checkout
------------------------------------------------------- */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
    margin-bottom: 50px;
}

.checkout-form {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.checkout-form h3 {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gold-light);
}

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--gray);
    margin-bottom: 7px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: var(--light);
    color: var(--black);
    transition: border-color .2s, background .2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--gold);
    background: #fff;
    outline: none;
}

.form-group textarea { resize: vertical; min-height: 90px; }

.hint-text {
    font-size: 12px;
    color: var(--gray);
    text-align: center;
    margin-top: 10px;
    line-height: 1.5;
}

/* Order Summary (checkout) */
.order-summary {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.order-summary h3 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gold-light);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 7px 0;
    gap: 8px;
}

.summary-item span:last-child { white-space: nowrap; font-weight: 600; }

.summary-divider { height: 2px; background: var(--gold); margin: 12px 0; }

/* -------------------------------------------------------
   Success Page
------------------------------------------------------- */
.success-page {
    max-width: 480px;
    margin: 60px auto 50px;
    text-align: center;
    background: var(--white);
    padding: 48px 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.success-icon {
    font-size: 72px;
    margin-bottom: 20px;
    animation: pop .5s cubic-bezier(.3,1.4,.5,1) both;
}

.success-page h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.success-page p { color: var(--gray); margin-bottom: 6px; }

.success-hint {
    background: var(--gold-light);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
    color: var(--gold-dark);
    margin: 20px 0;
    line-height: 1.5;
    font-weight: 500;
}

/* -------------------------------------------------------
   Empty State
------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 70px 20px;
    color: var(--gray);
}

.empty-state h3 { font-size: 1.2rem; margin-bottom: 8px; }

/* -------------------------------------------------------
   Footer
------------------------------------------------------- */
.footer {
    background: var(--black);
    color: #aaa;
    text-align: center;
    padding: 28px 0;
    font-size: 14px;
    margin-top: auto;
}

.footer strong { color: var(--gold); }

/* -------------------------------------------------------
   Animations
------------------------------------------------------- */
@keyframes pop {
    from { transform: scale(.3); opacity: 0; }
    to   { transform: scale(1);  opacity: 1; }
}

/* -------------------------------------------------------
   Responsive
------------------------------------------------------- */
@media (max-width: 800px) {
    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .cart-header { display: none; }

    .cart-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .cart-item-name { font-size: 15px; }
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-icon { font-size: 48px; padding: 20px 0; }
    .product-image { height: 160px; }

    .hero h1 { font-size: 1.4rem; }
    .hero h1 strong { font-size: 1.8rem; }

    .success-page { padding: 32px 20px; }
}

@media (max-width: 380px) {
    .product-grid { grid-template-columns: 1fr; }
}
