/* =========================
   Base general
   ========================= */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Montserrat', Arial, sans-serif;
    background: #0B0B0B;
    color: #F5F5F5;
}

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', serif;
}

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

.container {
    width: min(1200px, 90%);
    margin: 0 auto;
}

.page-section {
    padding: 48px 0 72px;
}

.panel {
    background: #161616;
    border: 1px solid #262626;
    border-radius: 10px;
    padding: 24px;
}

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

.eyebrow {
    display: inline-block;
    color: #C9A24A;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    margin-bottom: 10px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.section-title,
.title {
    margin: 0;
}

.price {
    color: #C9A24A;
    font-size: 1.08rem;
    font-weight: bold;
}

.description,
.muted {
    color: #b0b0b0;
    line-height: 1.7;
}

/* =========================
   Header
   ========================= */
.header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(17,17,17,.96);
    border-bottom: 1px solid #C9A24A;
    backdrop-filter: blur(8px);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    color: #C9A24A;
    font-size: 1.45rem;
    font-weight: bold;
}

.nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.nav a {
    color: #d0d0d0;
    transition: .2s ease;
}

.nav a:hover,
.nav a.active {
    color: #C9A24A;
}

/* =========================
   Footer
   ========================= */
.footer {
    border-top: 1px solid #2d2d2d;
    padding: 26px 0;
    color: #9e9e9e;
    margin-top: 40px;
}

.footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* =========================
   Hero
   ========================= */
.hero {
    padding: 84px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 30px;
    align-items: stretch;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.05;
    margin: 0 0 16px;
}

.hero p {
    color: #b5b5b5;
    max-width: 680px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-panel {
    background: rgba(26, 26, 26, 0.85);
    border: none;
    border-radius: 12px;
    padding: 28px;
    max-width: 560px;
}

/* =========================
   Botones
   ========================= */
.btn {
    display: inline-block;
    padding: 12px 18px;
    background: #C9A24A;
    color: #000000;
    font-weight: bold;
    border-radius: 6px;
    transition: 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #e0b92c;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 18px;
    border: 1px solid #C9A24A;
    color: #C9A24A;
    border-radius: 6px;
    transition: 0.2s ease;
    background: transparent;
}

.btn-secondary:hover {
    background: rgba(201, 162, 39, 0.08);
}

.card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* =========================
   Home extras
   ========================= */
.mini-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.mini-card {
    background: #161616;
    border: 1px solid #262626;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    font-weight: bold;
}

/* =========================
   Catálogo
   ========================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.product-card {
    background: #161616;
    border: 1px solid #262626;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
    border-color: #C9A24A;
    transform: translateY(-2px);
}

.product-image {
    height: 220px;
    background: linear-gradient(135deg, #2a2a2a, #1e1e1e);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin: 0 0 10px;
}

.product-info .description {
    min-height: 52px;
    margin-bottom: 16px;
}

/* =========================
   Detalle de producto
   ========================= */
.breadcrumb {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: #999;
    margin-bottom: 18px;
}

.breadcrumb a {
    color: #C9A24A;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.product-detail .image {
    min-height: 420px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2a2a2a, #1e1e1e);
}

.product-detail .info h1 {
    margin-top: 0;
    margin-bottom: 12px;
}

.product-detail .info .description {
    margin: 18px 0 22px;
}

/* =========================
   Carrito
   ========================= */
.cart-list {
    display: grid;
    gap: 16px;
}

.cart-item {
    background: #161616;
    border: 1px solid #262626;
    border-radius: 10px;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
}

.cart-item-main h3 {
    margin: 0 0 6px;
}

.cart-item-right {
    text-align: right;
}

.cart-total {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #2d2d2d;
    text-align: right;
    font-size: 1.15rem;
}

.cart-qty {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-qty a,
.cart-qty span {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.cart-qty a {
    background: #C9A24A;
    color: #000;
    font-weight: bold;
}

.cart-qty span {
    background: #141414;
    border: 1px solid #2d2d2d;
}

.cart-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.link-danger {
    color: #ff8d8d;
    font-size: 0.95rem;
}

.link-danger:hover {
    color: #ffb3b3;
}

/* =========================
   Checkout
   ========================= */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 20px;
}

.checkout-form,
.checkout-summary {
    background: #161616;
    border: 1px solid #262626;
    border-radius: 10px;
    padding: 24px;
}

.checkout-form h2,
.checkout-summary h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #d0d0d0;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    background: #0B0B0B;
    color: #fff;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #C9A24A;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #2a2a2a;
}

.summary-total {
    padding-top: 18px;
    margin-top: 14px;
    border-top: 1px solid #2d2d2d;
    font-size: 1.1rem;
    font-weight: bold;
    color: #C9A24A;
}

/* =========================
   Alertas
   ========================= */
.alert-error {
    background: rgba(255, 77, 77, 0.08);
    border: 1px solid rgba(255, 77, 77, 0.3);
    color: #ffb3b3;
    padding: 16px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error p {
    margin: 0 0 8px;
}

.alert-error p:last-child {
    margin-bottom: 0;
}

/* =========================
   Admin
   ========================= */
.auth-wrap {
    max-width: 520px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.admin-table-wrap {
    overflow-x: auto;
    margin-top: 16px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #161616;
    border: 1px solid #262626;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #2d2d2d;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: #C9A24A;
    background: #151515;
}

.admin-table tr:hover td {
    background: #171717;
}

.admin-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.admin-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.admin-card {
    background: #161616;
    border: 1px solid #262626;
    border-radius: 10px;
    padding: 22px;
}

.admin-card h2,
.admin-card h1 {
    margin-top: 0;
    margin-bottom: 16px;
}

.admin-card p {
    margin: 0 0 12px;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 980px) {
    .product-grid,
    .mini-grid,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-detail,
    .checkout-grid,
    .hero-grid,
    .admin-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 0;
    }

    .product-grid,
    .mini-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .cart-item-right {
        text-align: left;
    }

    .section-head {
        align-items: flex-start;
    }
}

/* ===== HEADER UX ===== */

.header {
    position: sticky;
    top: 0;
    background: rgba(15,15,15,0.95);
    backdrop-filter: blur(6px);
    z-index: 100;
}

.nav a.active {
    color: #C9A24A;
    font-weight: bold;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
}

/* ===== CART ICON ===== */
.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 20px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #C9A24A;
    color: #000;
    font-size: 12px;
    padding: 3px 6px;
    border-radius: 50%;
}

/* ===== DRAWER ===== */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -350px;
    width: 320px;
    height: 100%;
    background: #0B0B0B;
    border-left: 1px solid #333;
    transition: 0.3s ease;
    z-index: 200;
    padding: 20px;
}

.cart-drawer.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-item {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

/* ===== CART ICON ===== */
.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 20px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #C9A24A;
    color: #000;
    font-size: 12px;
    padding: 3px 6px;
    border-radius: 50%;
}

/* ===== DRAWER ===== */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -350px;
    width: 320px;
    height: 100%;
    background: #0B0B0B;
    border-left: 1px solid #333;
    transition: 0.3s ease;
    z-index: 200;
    padding: 20px;
}

.cart-drawer.open {
    right: 0;
}

/* ===== DRAWER CONTENT ===== */
.cart-body {
    margin-top: 20px;
}

.drawer-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #2a2a2a;
    padding: 12px 0;
}

.drawer-info p {
    margin: 0;
    font-size: 14px;
}

.drawer-info small {
    color: #aaa;
}

.drawer-right span {
    display: block;
    font-weight: bold;
    color: #C9A24A;
}

.remove {
    color: #ff6b6b;
}

.drawer-total {
    margin-top: 15px;
    text-align: right;
    border-top: 1px solid #333;
    padding-top: 10px;
}

.drawer-actions {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-cart {
    text-align: center;
    margin-top: 30px;
}

/* ===== OVERLAY ===== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 150;
}

.cart-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ===== DRAWER PRO ===== */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -360px;
    width: 340px;
    height: 100%;
    background: #0B0B0B;
    border-left: 1px solid #333;
    transition: 0.35s cubic-bezier(.4,0,.2,1);
    z-index: 200;
    padding: 20px;
}

.cart-drawer.open {
    right: 0;
}

/* CONTROLES DE CANTIDAD */
.qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0;
}

.qty-controls a {
    width: 26px;
    height: 26px;
    background: #C9A24A;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: bold;
}

.qty-controls span {
    min-width: 20px;
    text-align: center;
}

/* ===== HERO PANEL WHATSAPP ===== */
.hero-panel-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.whatsapp-circle {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border: 2px solid #C9A24A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-panel-text h3 {
    margin: 0 0 6px;
}

.hero-panel-text p {
    margin: 0;
}

.hero-panel-arrow {
    margin-left: auto;
    font-size: 1.4rem;
    color: #C9A24A;
    flex-shrink: 0;
}

/*###########*/

.hero {
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(to right, rgba(0,0,0,0.75) 35%, transparent 90%),
        linear-gradient(to top, rgba(0,0,0,0.6) 30%, transparent 50%);
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.header-inner {
    min-height: 102px;
    max-height: 72px;
    padding-top: 50px;
    padding-bottom: 30px;
}

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

/* ===== HEADER DINÁMICO ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.35s ease, border-color 0.35s ease;
}

.page-home .header.transparent {
    background: transparent !important;
    border-bottom-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.page-home .header.transparent .nav a {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.page-home .header.transparent .cart-icon {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.page-home .header-inner {
    padding-top: 50px;
    padding-bottom: 30px;
}

.header.transparent .logo {
    opacity: 1 !important;
    pointer-events: auto;
}

/* ===== MÓVIL HEADER FIX ===== */
@media (max-width: 680px) {

    .header-inner {
        flex-direction: row;
        align-items: center;
        padding-top: 12px;
        padding-bottom: 12px;
        min-height: unset;
        max-height: unset;
    }

    .page-home .header-inner {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .nav {
        gap: 8px;
    }

    .nav a {
        font-size: 0.75rem;
    }

    .logo-desktop { 
        display: none; 
    }

    .logo-mobile  { 
        display: block; 
        height: 44px; 
        width: auto; }
    
    .header.transparent .nav a {
        opacity: 0;
        pointer-events: none;
    }

    .header.transparent .cart-icon {
        opacity: 0;
        pointer-events: none;
    }
}

@media (max-width: 680px) {
    .logo-desktop { 
        display: none !important; 
    }
    
    .logo-mobile { 
        display: none !important; 
    }
    
    .logo img { 
        display: none !important; 
    }
}

body:not(.page-home) {
    padding-top: 90px;
}

.carousel-wrap {
    width: 100%;
}

.carousel-main {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #2a2a2a, #1e1e1e);
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-main img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

.carousel-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.carousel-thumbs .thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.carousel-thumbs .thumb:hover,
.carousel-thumbs .thumb.active {
    border-color: #C9A24A;
}