/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #c99c75;       /* Ouro Rosé / Dourado elegante */
    --primary-hover: #b0845e;
    --secondary: #e76f51;     /* Coral de destaque */
    --background: #faf7f2;    /* Fundo creme suave premium */
    --surface: #ffffff;
    --text-main: #2b2b2b;
    --text-muted: #707070;
    --border: #ece5db;
    --shadow: rgba(43, 43, 43, 0.05);
    --shadow-lg: rgba(43, 43, 43, 0.12);
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;
    --whatsapp: #25d366;
    --transition-speed: 0.3s;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-main);
}

a {
    color: inherit;
    text-decoration: none;
}

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

.text-center {
    text-align: center;
}

.py-5 {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}

.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-speed) ease;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 156, 117, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

.btn-whatsapp {
    background-color: var(--whatsapp);
    color: var(--surface);
}

.btn-whatsapp:hover {
    background-color: #20ba56;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Header */
header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px var(--shadow);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-area img {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Menu de navegação */
.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link-item {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    transition: color var(--transition-speed);
    position: relative;
    padding: 0.25rem 0;
}

.nav-link-item:hover {
    color: var(--primary);
}

.nav-link-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width var(--transition-speed);
}

.nav-link-item:hover::after {
    width: 100%;
}

.cart-icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    position: relative;
    color: var(--text-main);
    transition: color var(--transition-speed);
}

.cart-icon-btn:hover {
    color: var(--primary);
}

#cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--secondary);
    color: var(--surface);
    font-size: 0.75rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #fdfbf7 0%, #f5efe6 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.hero-subtitle {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero h2 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 550px;
}

.hero-image-wrap {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(43, 43, 43, 0.1);
    transform: rotate(-2deg);
    transition: transform var(--transition-speed);
}

.hero-img:hover {
    transform: rotate(0) scale(1.02);
}

/* Controls (Filters & Search) */
.controls-section {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 80px;
    z-index: 90;
    padding: 1.25rem 0;
    box-shadow: 0 4px 6px -4px var(--shadow);
}

/* Ajuste da posição sticky quando o admin bar está ativo */
.admin-toolbar + header + .hero + .controls-section {
    top: 130px; /* 80px do header + 50px do admin toolbar */
}

/* Ajuste padrão do sticky header quando o admin bar está ativo */
.admin-toolbar + header {
    top: 50px;
}

.controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    width: 320px;
    max-width: 100%;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1.25rem 0.75rem 2.5rem;
    border-radius: 50px;
    border: 1.5px solid var(--border);
    background-color: var(--background);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: all var(--transition-speed);
}

.search-box input:focus {
    border-color: var(--primary);
    background-color: var(--surface);
    box-shadow: 0 0 0 3px rgba(201, 156, 117, 0.15);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.category-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.category-scroll::-webkit-scrollbar {
    height: 4px;
}

.category-scroll::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 10px;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 550;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-speed);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--surface);
}

/* Product Catalog */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 2.25rem;
    margin-top: 2rem;
}

.product-card {
    background-color: var(--surface);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    border: 1px solid var(--border);
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative; /* Para botões do admin */
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px var(--shadow-lg);
    border-color: var(--primary);
}

.product-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-card-img img {
    transform: scale(1.08);
}

.product-category-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    backdrop-filter: blur(5px);
}

.product-card-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    font-weight: 700;
    transition: color var(--transition-speed);
}

.product-title:hover {
    color: var(--primary);
}

.product-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary);
    margin-top: auto;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
}

/* Quem Somos Section */
.quem-somos-section {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.quem-somos-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3.5rem;
    align-items: center;
}

.quem-somos-text p {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    text-align: justify;
}

.quem-somos-text p:last-child {
    margin-bottom: 0;
}

.quem-somos-visual {
    display: flex;
    justify-content: center;
}

.visual-card {
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    padding: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 15px 35px var(--shadow-lg);
    transition: transform var(--transition-speed) ease;
}

.visual-card:hover {
    transform: scale(1.03);
}

.visual-card img {
    max-width: 100%;
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 12px;
}

/* Slide-over Cart */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    max-width: 100%;
    height: 100%;
    background-color: var(--surface);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 200;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 190;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.4rem;
}

#close-cart {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
    transition: color var(--transition-speed);
}

#close-cart:hover {
    color: var(--secondary);
}

#cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1rem;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.25rem;
}

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

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cart-item-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.cart-item-price {
    color: var(--primary);
    font-weight: bold;
    font-size: 0.9rem;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.qty-btn {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background-color: var(--background);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all var(--transition-speed);
}

.qty-btn:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--surface);
}

.cart-item-remove {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition-speed);
    font-size: 1.1rem;
}

.cart-item-remove:hover {
    color: var(--secondary);
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background-color: var(--background);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
}

/* Quickview Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--surface);
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: var(--background);
    border: 1px solid var(--border);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: 10;
    transition: all var(--transition-speed);
}

.modal-close:hover {
    background-color: var(--secondary);
    color: var(--surface);
    border-color: var(--secondary);
}

.qv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2.5rem;
}

.qv-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.qv-main-img-wrap {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.qv-main-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qv-gallery {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color var(--transition-speed);
}

.gallery-thumb.active {
    border-color: var(--primary);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qv-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.qv-category {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.qv-details h2 {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.qv-price {
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.qv-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--whatsapp);
    color: var(--surface);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 150;
    transition: all var(--transition-speed);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #20ba56;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background-color: var(--text-main);
    color: var(--surface);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 400;
    display: flex;
    align-items: center;
    font-weight: 550;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ==========================================
   ESTILOS DO MODO ADMINISTRADOR (CRUD)
   ========================================== */

/* Barra de ferramentas do Admin */
.admin-toolbar {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 110;
    border-bottom: 2px solid var(--primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.admin-toolbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-badge {
    color: var(--primary);
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
}

/* Botões do card no modo Admin */
.admin-card-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.admin-btn {
    border: none;
    border-radius: 4px;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: transform var(--transition-speed), background-color var(--transition-speed);
}

.admin-btn.edit {
    background-color: #3b82f6;
    color: #ffffff;
}

.admin-btn.edit:hover {
    background-color: #2563eb;
    transform: scale(1.05);
}

.admin-btn.delete {
    background-color: #ef4444;
    color: #ffffff;
}

.admin-btn.delete:hover {
    background-color: #dc2626;
    transform: scale(1.05);
}

/* Estilo do Formulário no Modal do Admin */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    font-family: var(--font-body);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input, 
.form-group textarea {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background-color: var(--background);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: all var(--transition-speed);
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--primary);
    background-color: var(--surface);
    box-shadow: 0 0 0 3px rgba(201, 156, 117, 0.1);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.fade-in-up {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-image-wrap {
        order: -1;
    }
    
    .hero-img {
        max-width: 80%;
    }
    
    .hero h2 {
        font-size: 2.8rem;
    }
    
    .quem-somos-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .quem-somos-visual {
        order: -1;
    }
    
    .qv-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none; /* Esconder menu longo no mobile para simplificar header */
    }
}

@media (max-width: 576px) {
    .header-container {
        height: 70px;
    }
    
    .logo-title {
        font-size: 1.3rem;
    }
    
    .controls-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        width: 100%;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .whatsapp-float {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }
    
    .form-row-2 {
        grid-template-columns: 1fr;
    }
}
