﻿@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Playfair+Display:wght@400;600;700&display=swap');

:root {
    --primary: #3313b6;
    --secondary: #EBD5BE;
    --accent: #E2877E;
    --dark: #200807;
    --light: #FEFEFE;
    --bg: #f8f5f5;
}

html { scroll-behavior: smooth; }
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Lato', sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
}

.header { background: var(--primary); color: var(--light); padding: 0.75rem 1.5rem; position: relative; display: flex; align-items: center; }
.header::after { content: ''; display: block; width: 100%; height: 3px; background: var(--accent); position: absolute; bottom: 0; left: 0; }
.logo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); flex-shrink: 0; background: var(--light); }
.topbar-logo { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); background: var(--light); }
.header-text { flex: 1; text-align: center; }
.header-ornament { color: #ffffff; font-size: 1.5rem; letter-spacing: 0.3rem; opacity: 1; white-space: nowrap; grid-column: 2; }
.header-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 0.8rem; }
.header h1 { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 0.3rem; }
.header p { color: var(--accent); font-size: 0.95rem; font-weight: 300; letter-spacing: 0.06em; }
.nav { display: flex; align-items: center; gap: 0.6rem; grid-column: 3; justify-self: end; }
.nav a { color: var(--secondary); text-decoration: none; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.4rem 0.8rem; border: 1px solid transparent; border-radius: 3px; transition: all 0.2s; }
.nav a:hover { color: var(--light); border-color: var(--accent); }
.nav-sep { color: var(--accent); font-size: 0.7rem; opacity: 0.6; }
.topbar-nav { margin-left: auto; display: flex; gap: 1rem; }
.topbar-nav a { color: var(--secondary); text-decoration: none; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; transition: color 0.2s; }
.topbar-nav a:hover { color: var(--accent); }

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

.topbar { background: var(--primary); padding: 1rem 1.5rem; position: sticky; top: 0; z-index: 100; }
.topbar-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 0.75rem; }
.back-btn { background: linear-gradient(135deg, rgba(226,135,126,0.25), rgba(226,135,126,0.08)); border: 2px solid var(--accent); color: var(--secondary); width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 1.15rem; text-decoration: none; transition: all 0.25s ease; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 2px 8px rgba(32,8,7,0.25), inset 0 1px 0 rgba(255,255,255,0.15); }
.back-btn:hover { background: linear-gradient(135deg, var(--accent), #d0706a); color: var(--light); transform: translateX(-3px); box-shadow: 0 4px 14px rgba(226,135,126,0.4); }
.back-btn:active { transform: translateX(-1px) scale(0.95); }
.topbar h1 { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: var(--light); font-weight: 600; }

.btn { display: inline-block; background: var(--accent); color: var(--light); padding: 0.75rem 1.5rem; border: none; border-radius: 4px; cursor: pointer; font-family: 'Lato', sans-serif; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; transition: all 0.25s ease; text-decoration: none; text-align: center; }
.btn:hover { background: #d0706a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(226,135,126,0.3); }
.btn-whatsapp { background: #25d366; }
.btn-whatsapp:hover { background: #1da851; box-shadow: 0 4px 12px rgba(37,211,102,0.3); }
.btn-small { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-primary { background: var(--accent); color: var(--light); }
.btn-primary:hover { background: #d0706a; }
.btn-outline { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--light); }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 1rem; }
.product-card { background: var(--light); border: 1px solid var(--secondary); border-radius: 6px; overflow: hidden; transition: all 0.25s ease; cursor: pointer; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(83,47,39,0.1); }
.product-card img { width: 100%; aspect-ratio: 5 / 4; object-fit: contain; background: var(--light); }
.product-info { padding: 1rem 1.2rem 1.2rem; }
.product-info h3 { margin-bottom: 0.4rem; color: var(--dark); font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 600; }
.product-info .price { font-size: 1.15rem; color: var(--primary); font-weight: 700; }
.product-info p { color: var(--primary); margin: 0.4rem 0; font-size: 0.88rem; }
.category-tag { display: inline-block; background: var(--secondary); color: var(--primary); padding: 0.2rem 0.7rem; border-radius: 3px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.5rem; }
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 3px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 0.3rem; }
.badge-featured { background: var(--secondary); color: var(--primary); }
.badge-popular { background: var(--accent); color: var(--light); }

.search-bar { margin: 1.5rem 0; }
.search-bar input { width: 100%; padding: 0.85rem 1.2rem; border: 2px solid var(--secondary); border-radius: 4px; font-family: 'Lato', sans-serif; font-size: 1rem; outline: none; background: var(--light); transition: border-color 0.2s; }
.search-bar input:focus { border-color: var(--accent); }

.categories { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.categories select { width: 100%; max-width: 320px; padding: 0.75rem 1rem; background: var(--light); border: 2px solid var(--secondary); border-radius: 4px; cursor: pointer; font-family: 'Lato', sans-serif; font-size: 0.95rem; font-weight: 600; color: var(--primary); outline: none; transition: border-color 0.2s; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23532F27' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
.categories select:focus { border-color: var(--accent); }

.section-title { font-family: 'Playfair Display', serif; font-size: 1.4rem; margin: 2rem 0 1rem; color: var(--dark); font-weight: 600; }
.no-results { text-align: center; padding: 3rem; color: var(--primary); grid-column: 1/-1; }
.loading { text-align: center; padding: 2rem; color: var(--primary); }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(83,47,39,0.35); z-index: 1000; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { background: var(--light); border-radius: 6px; padding: 2rem; max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; box-shadow: 0 12px 40px rgba(32,8,7,0.2); }
.modal-content h2 { font-family: 'Playfair Display', serif; margin-bottom: 1rem; color: var(--dark); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 700; color: var(--dark); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.03em; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 0.75rem; border: 2px solid var(--secondary); border-radius: 4px; font-family: 'Lato', sans-serif; font-size: 1rem; outline: none; transition: border-color 0.2s; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--accent); }
.form-group textarea { min-height: 80px; resize: vertical; }
.close-btn { float: right; background: var(--secondary); border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; color: var(--primary); transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.close-btn:hover { background: var(--accent); color: var(--light); }

.qr-section { text-align: center; padding: 1.5rem; background: var(--secondary); border-radius: 4px; margin: 1rem 0; }
.qr-image { width: 220px; height: 220px; object-fit: contain; border-radius: 4px; background: var(--light); padding: 0.5rem; margin: 0.75rem auto; display: block; border: 2px solid var(--light); }
.payment-methods { display: flex; gap: 1rem; justify-content: center; margin-top: 1rem; }
.payment-method { padding: 0.5rem 1rem; background: var(--light); border: 2px solid var(--secondary); border-radius: 4px; font-weight: 700; cursor: pointer; font-size: 0.9rem; color: var(--primary); transition: all 0.2s; }
.payment-method.selected { border-color: var(--accent); background: var(--accent); color: var(--light); }

.upload-area { border: 2px dashed var(--secondary); border-radius: 4px; padding: 2rem; text-align: center; cursor: pointer; transition: border-color 0.2s; }
.upload-area:hover { border-color: var(--accent); }
.upload-area input { display: none; }
.upload-area p { color: var(--primary); }
.upload-preview { max-width: 100%; max-height: 200px; margin-top: 1rem; border-radius: 4px; }

.success-message { text-align: center; padding: 2rem; }
.success-message h3 { color: var(--accent); font-family: 'Playfair Display', serif; margin-bottom: 1rem; }
.success-message p { color: var(--primary); margin-bottom: 1.5rem; }

.variant-section { margin-bottom: 1.5rem; }
.variant-section label { display: block; font-weight: 700; margin-bottom: 0.5rem; color: var(--dark); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.03em; }
.variant-options { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.variant-opt { padding: 0.5rem 1rem; border: 2px solid var(--secondary); border-radius: 4px; cursor: pointer; font-size: 0.9rem; transition: all 0.2s; background: var(--light); display: flex; align-items: center; gap: 0.3rem; color: var(--primary); font-weight: 600; }
.variant-opt:hover { border-color: var(--accent); color: var(--accent); }
.variant-opt.selected { border-color: var(--accent); background: var(--accent); color: var(--light); font-weight: 700; }

.product-page { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; background: var(--light); border: 1px solid var(--secondary); border-radius: 6px; overflow: hidden; }
.product-image { width: 100%; aspect-ratio: 5 / 4; object-fit: contain; background: var(--secondary); }
.product-details { padding: 2rem; }
.product-details h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; margin-bottom: 0.5rem; color: var(--dark); }
.product-details .price { font-size: 1.4rem; color: var(--primary); font-weight: 700; margin-bottom: 1rem; }
.product-details .description { color: var(--primary); margin-bottom: 1.5rem; line-height: 1.7; }
.action-buttons { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }
.not-found { text-align: center; padding: 4rem; color: var(--primary); }

.variant-img-swatch { width: 24px; height: 24px; border-radius: 3px; object-fit: cover; border: 2px solid var(--secondary); }

.footer { background: var(--dark); color: var(--secondary); margin-top: 3rem; position: relative; }
.footer::before { content: ''; display: block; width: 100%; height: 3px; background: var(--accent); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 2.5rem 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.footer-col h3 { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: var(--light); margin-bottom: 1rem; }
.footer-col p { font-size: 0.9rem; line-height: 1.7; margin-bottom: 0.5rem; }
.footer-col a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--light); }
.footer-bottom { text-align: center; padding: 1rem 1.5rem; border-top: 1px solid rgba(235,213,190,0.15); font-size: 0.8rem; color: var(--primary); }
.social-links { display: flex; justify-content: center; gap: 1rem; margin-bottom: 0.75rem; }
.social-link { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; color: var(--accent); transition: all 0.2s; }
.social-link:hover { background: var(--accent); color: var(--light); }

.track-card { border: 2px solid var(--secondary); border-radius: 6px; overflow: hidden; }
.track-card-header { background: var(--primary); color: var(--light); padding: 1rem 1.2rem; font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.track-card-body { padding: 1.2rem; }
.track-section { margin-bottom: 1.2rem; }
.track-section:last-child { margin-bottom: 0; }
.track-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--primary); margin-bottom: 0.3rem; }
.track-value { font-size: 0.95rem; color: var(--dark); }
.track-status-badge { display: inline-block; padding: 0.3rem 0.8rem; border-radius: 3px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; }
.track-status-pending { background: var(--secondary); color: var(--primary); }
.track-status-confirmed { background: var(--primary); color: var(--light); }
.track-status-preparing { background: #8B5E3C; color: var(--light); }
.track-status-shipped { background: var(--accent); color: var(--light); }
.track-status-delivered { background: #2d8a4e; color: var(--light); }
.track-status-rejected { background: #dc3545; color: var(--light); }

.timeline { padding: 0.5rem 0; }
.timeline-step { display: flex; align-items: flex-start; gap: 0.75rem; position: relative; padding-bottom: 1.2rem; }
.timeline-step:last-child { padding-bottom: 0; }
.timeline-dot { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; margin-top: 1px; }
.timeline-dot.done { background: #2d8a4e; color: var(--light); }
.timeline-dot.current { background: var(--accent); color: var(--light); box-shadow: 0 0 0 4px rgba(226,135,126,0.25); }
.timeline-dot.upcoming { background: var(--secondary); color: var(--primary); }
.timeline-text { font-size: 0.88rem; color: var(--dark); padding-top: 1px; }
.timeline-text.done { color: #2d8a4e; font-weight: 600; }
.timeline-text.current { color: var(--accent); font-weight: 700; }
.timeline-text.upcoming { color: #999; }
.timeline-line { position: absolute; left: 9px; top: 22px; width: 2px; height: calc(100% - 22px); background: var(--secondary); }
.timeline-step:last-child .timeline-line { display: none; }
.timeline-line.done { background: #2d8a4e; }

.copy-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.3rem; }
.copy-btn { background: var(--secondary); border: none; padding: 0.35rem 0.7rem; border-radius: 3px; font-size: 0.75rem; font-weight: 700; color: var(--primary); cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.copy-btn:hover { background: var(--accent); color: var(--light); }

.form-group input[type="number"] { width: 100%; padding: 0.75rem; border: 2px solid var(--secondary); border-radius: 4px; font-family: 'Lato', sans-serif; font-size: 1rem; outline: none; transition: border-color 0.2s; }
.form-group input[type="number"]:focus { border-color: var(--accent); }

.field-hint { font-size: 0.78rem; color: #999; margin-top: 0.25rem; font-style: italic; }
.track-not-found { text-align: center; padding: 1.5rem; color: var(--primary); }

.status-select { padding: 0.5rem 0.75rem; border: 2px solid var(--secondary); border-radius: 4px; font-family: 'Lato', sans-serif; font-size: 0.9rem; font-weight: 600; color: var(--primary); background: var(--light); cursor: pointer; outline: none; }
.status-select:focus { border-color: var(--accent); }
.courier-input { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.courier-input input { flex: 1; padding: 0.5rem 0.75rem; border: 2px solid var(--secondary); border-radius: 4px; font-family: 'Lato', sans-serif; font-size: 0.9rem; outline: none; }
.courier-input input:focus { border-color: var(--accent); }

.cart-link { position: relative; display: inline-flex; align-items: center; gap: 0.3rem; color: var(--secondary); text-decoration: none; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.4rem 0.8rem; border: 1px solid transparent; border-radius: 3px; transition: all 0.2s; }
.cart-link:hover { color: var(--light); border-color: var(--accent); }
.cart-icon { font-size: 1.1rem; }
.cart-badge { position: absolute; top: -4px; right: -4px; background: var(--accent); color: var(--light); font-size: 0.65rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }

@media (max-width: 768px) {
    .header { flex-wrap: wrap; justify-content: center; padding: 0.75rem 1rem; }
    .logo { width: 80px; height: 80px; }
    .header h1 { font-size: 1.5rem; }
    .header p { font-size: 0.82rem; }
    .header-ornament { display: none; }
    .header-bottom { grid-template-columns: 1fr; gap: 0.5rem; text-align: center; }
    .nav { grid-column: 1; justify-self: center; flex-wrap: wrap; justify-content: center; }
    .nav a { font-size: 0.75rem; padding: 0.35rem 0.5rem; }
    .cart-link { font-size: 0.75rem; padding: 0.35rem 0.5rem; }
    .products { grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 0.75rem; }
    .product-card img { aspect-ratio: 1; }
    .product-info { padding: 0.75rem; }
    .product-info h3 { font-size: 0.92rem; }
    .product-info .price { font-size: 1rem; }
    .product-page { grid-template-columns: 1fr; }
    .product-page .product-image { aspect-ratio: 1; }
    .product-details { padding: 1.2rem; }
    .product-details h2 { font-size: 1.3rem; }
    .action-buttons { flex-direction: column; }
    .action-buttons .btn { width: 100%; }
    .modal-content { width: 95%; padding: 1.2rem; max-height: 85vh; }
    .topbar-inner { gap: 0.5rem; }
    .topbar h1 { font-size: 0.95rem; }
    .back-btn { width: 36px; height: 36px; font-size: 1rem; }
    .topbar-nav { margin-left: auto; gap: 0.6rem; }
    .topbar-nav a { font-size: 0.7rem; }
    .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem 1rem; }
    .section-title { font-size: 1.2rem; margin: 1.5rem 0 0.75rem; }
    .container { padding: 1rem; }
    .categories select { max-width: 100%; }
    .payment-methods { flex-direction: column; align-items: stretch; }
    .upload-area { padding: 1.2rem; }
}
@media (max-width: 380px) {
    .products { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .product-info { padding: 0.5rem; }
    .product-info h3 { font-size: 0.82rem; }
    .product-info .price { font-size: 0.9rem; }
    .product-info p { font-size: 0.78rem; }
    .category-tag { font-size: 0.65rem; }
    .header h1 { font-size: 1.3rem; }
}
