/* ============================================================
   JOYERÍA E-COMMERCE - MAIN STYLESHEET
   Theme: Gold & Black | Fonts: Playfair Display + Inter
   ============================================================ */

/* --- Variables --- */
:root {
    --gold: #C8A960;
    --gold-light: #D4BC7C;
    --gold-dark: #A68B4B;
    --gold-accent: #E8D5A3;
    --black: #1A1A1A;
    --black-soft: #2D2D2D;
    --black-light: #3A3A3A;
    --white: #FFFFFF;
    --bg-cream: #FAFAF8;
    --bg-warm: #F5F3EF;
    --text-muted: #6B6B6B;
    --text-light: #B8B5AE;
    --danger: #dc3545;
    --success: #28a745;
    --warning: #ffc107;
    --info: #17a2b8;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-accent: 'Cormorant Garamond', Georgia, serif;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: 0.3s ease;
    --container: 1240px;
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); color: var(--black); background: var(--white); line-height: 1.6; font-size: 15px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* --- Utilities --- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold); }
.text-line-through { text-decoration: line-through; }

/* --- Top Bar --- */
.top-bar { background: var(--black); color: var(--text-light); font-size: 12px; padding: 8px 0; letter-spacing: 0.3px; }
.top-bar__inner { display: flex; justify-content: space-between; align-items: center; }
.top-bar__left i { color: var(--gold); margin-right: 6px; }
.top-bar__right { display: flex; gap: 16px; }
.top-bar__currency a, .top-bar__lang a { color: var(--text-light); padding: 2px 4px; }
.top-bar__currency a.active, .top-bar__lang a.active { color: var(--gold); font-weight: 600; }
.top-bar__currency span, .top-bar__lang span { opacity: 0.4; }

/* --- Header --- */
.header { background: var(--white); border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 1000; }
.header__inner { display: flex; align-items: center; gap: 24px; padding: 16px 20px; }
.header__logo img { height: 45px; width: auto; }
.header__logo-text { font-family: var(--font-heading); font-size: 26px; color: var(--gold); font-weight: 700; letter-spacing: 1px; }
.header__search { flex: 1; max-width: 500px; position: relative; }
.search-form { display: flex; background: var(--bg-cream); border: 1px solid #e5e5e5; border-radius: 100px; overflow: hidden; transition: border-color var(--transition); }
.search-form:focus-within { border-color: var(--gold); }
.search-form input { flex: 1; padding: 10px 20px; border: none; background: transparent; outline: none; font-size: 14px; }
.search-form button { padding: 10px 18px; color: var(--gold); font-size: 16px; }
.search-results { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); display: none; z-index: 100; max-height: 400px; overflow-y: auto; }
.header__actions { display: flex; gap: 8px; }
.header__action { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: var(--black); font-size: 18px; transition: all var(--transition); position: relative; }
.header__action:hover { color: var(--gold); background: var(--bg-cream); }
.header__cart-count { position: absolute; top: -2px; right: -2px; background: var(--gold); color: var(--black); font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.header__menu-toggle { display: none; font-size: 22px; padding: 8px; }
.header__action--search-mobile { display: none; }

/* --- Nav --- */
.nav { background: var(--black); }
.nav__list { display: flex; justify-content: center; gap: 0; }
.nav__item { position: relative; }
.nav__link { display: block; padding: 14px 22px; color: var(--white); font-size: 13px; font-weight: 500; letter-spacing: 0.8px; text-transform: uppercase; transition: color var(--transition); }
.nav__link:hover, .nav__link--highlight { color: var(--gold); }
.nav__link--highlight { font-weight: 600; }
.nav__submenu { position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--white); box-shadow: var(--shadow-lg); border-radius: 0 0 var(--radius) var(--radius); opacity: 0; visibility: hidden; transform: translateY(8px); transition: all var(--transition); z-index: 100; }
.nav__item:hover .nav__submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__submenu li a { display: block; padding: 10px 20px; color: var(--black); font-size: 13px; border-bottom: 1px solid #f0f0f0; }
.nav__submenu li a:hover { color: var(--gold); background: var(--bg-cream); }
.nav__submenu li:last-child a { border-bottom: none; }

/* --- Breadcrumb --- */
.breadcrumb { background: var(--bg-cream); padding: 12px 0; font-size: 13px; }
.breadcrumb__list { display: flex; align-items: center; gap: 8px; }
.breadcrumb__item + .breadcrumb__item::before { content: '›'; color: var(--text-light); margin-right: 8px; }
.breadcrumb__item a { color: var(--text-muted); }
.breadcrumb__item a:hover { color: var(--gold); }
.breadcrumb__item:last-child { color: var(--gold); font-weight: 500; }

/* --- Alerts --- */
.alert { padding: 12px 0; font-size: 14px; }
.alert .container { display: flex; align-items: center; justify-content: space-between; }
.alert--success { background: #d4edda; color: #155724; }
.alert--error { background: #f8d7da; color: #721c24; }
.alert--info { background: #cce5ff; color: #004085; }
.alert__close { background: none; border: none; font-size: 20px; cursor: pointer; opacity: 0.5; }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 100px; font-weight: 600; font-size: 14px; letter-spacing: 0.5px; transition: all var(--transition); border: 2px solid transparent; text-align: center; justify-content: center; }
.btn--gold { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--black); }
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(200,169,96,0.4); }
.btn--outline { border-color: var(--gold); color: var(--gold); background: transparent; }
.btn--outline:hover { background: var(--gold); color: var(--black); }
.btn--lg { padding: 16px 36px; font-size: 16px; }
.btn--sm { padding: 8px 16px; font-size: 12px; }
.btn--block { width: 100%; }

/* --- Hero Slider --- */
.hero-slider { position: relative; overflow: hidden; }
.hero-slide { min-height: 550px; background-size: cover; background-position: center; display: none; position: relative; }
.hero-slide::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.6), transparent); }
.hero-slide--active { display: flex; align-items: center; }
.hero-slide__content { position: relative; z-index: 2; max-width: 600px; }
.hero-slide__title { font-family: var(--font-heading); font-size: 48px; color: var(--white); margin-bottom: 16px; line-height: 1.2; }
.hero-slide__subtitle { font-size: 18px; color: var(--gold-accent); margin-bottom: 28px; font-family: var(--font-accent); font-style: italic; }
.hero-slider__dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.4); border: none; cursor: pointer; transition: all var(--transition); }
.hero-dot--active { background: var(--gold); width: 32px; border-radius: 6px; }

/* --- Sections --- */
.section { padding: 60px 0; }
.section--dark { background: var(--bg-warm); }
.section--categories { padding: 48px 0; }
.section__title { font-family: var(--font-heading); font-size: 32px; text-align: center; margin-bottom: 40px; color: var(--black); }
.section__title::after { content: ''; display: block; width: 60px; height: 3px; background: var(--gold); margin: 12px auto 0; border-radius: 2px; }
.section__cta { text-align: center; margin-top: 32px; }

/* --- Categories Grid --- */
.categories-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.category-card { text-align: center; transition: transform var(--transition); }
.category-card:hover { transform: translateY(-4px); }
.category-card__image { width: 140px; height: 140px; margin: 0 auto 12px; border-radius: 50%; overflow: hidden; border: 3px solid var(--gold-accent); transition: border-color var(--transition); }
.category-card:hover .category-card__image { border-color: var(--gold); }
.category-card__image img { width: 100%; height: 100%; object-fit: cover; }
.category-card__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bg-warm); color: var(--gold); font-size: 36px; }
.category-card__name { font-family: var(--font-heading); font-size: 16px; margin-bottom: 4px; }
.category-card__count { font-size: 12px; color: var(--text-muted); }

/* --- Products Grid --- */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card { background: var(--white); border-radius: var(--radius); overflow: hidden; transition: all var(--transition); border: 1px solid #f0f0f0; }
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.product-card__image-link { display: block; position: relative; aspect-ratio: 1; overflow: hidden; background: var(--bg-cream); }
.product-card__image-link img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-card__image-link img { transform: scale(1.05); }
.product-card__no-image { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-light); font-size: 48px; }
.product-card__badge { position: absolute; top: 12px; left: 12px; padding: 4px 10px; font-size: 11px; font-weight: 700; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.product-card__badge--sale { background: var(--danger); color: var(--white); }
.product-card__badge--new { background: var(--gold); color: var(--black); top: auto; bottom: 12px; }
.product-card__info { padding: 16px; }
.product-card__name { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card__name:hover { color: var(--gold); }
.product-card__price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.product-card__price-old { text-decoration: line-through; color: var(--text-muted); font-size: 13px; }
.product-card__price-current { font-size: 18px; font-weight: 700; color: var(--black); }
.product-card__currency { font-size: 11px; color: var(--text-muted); }
.product-card__rating { font-size: 12px; color: var(--gold); margin-bottom: 8px; }
.product-card__rating span { color: var(--text-muted); }
.product-card__cart-form { display: flex; }
.product-card__add-btn { width: 100%; padding: 10px; background: var(--black); color: var(--gold); border-radius: var(--radius); font-size: 14px; transition: all var(--transition); }
.product-card__add-btn:hover { background: var(--gold); color: var(--black); }

/* --- Guarantees --- */
.section--guarantees { background: var(--black); color: var(--white); padding: 48px 0; }
.guarantees-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.guarantee-item i { font-size: 32px; color: var(--gold); margin-bottom: 12px; }
.guarantee-item h3 { font-family: var(--font-heading); font-size: 16px; margin-bottom: 6px; }
.guarantee-item p { font-size: 13px; color: var(--text-light); }

/* --- Footer --- */
.footer { background: var(--black); color: var(--text-light); padding: 60px 0 0; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 40px; }
.footer__logo { font-family: var(--font-heading); font-size: 24px; color: var(--gold); display: block; margin-bottom: 12px; }
.footer__tagline { font-size: 14px; margin-bottom: 16px; font-family: var(--font-accent); font-style: italic; }
.footer__social { display: flex; gap: 12px; }
.footer__social a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--black-light); display: flex; align-items: center; justify-content: center; color: var(--text-light); transition: all var(--transition); }
.footer__social a:hover { border-color: var(--gold); color: var(--gold); }
.footer__title { font-family: var(--font-heading); font-size: 16px; color: var(--white); margin-bottom: 16px; }
.footer__links li { margin-bottom: 10px; }
.footer__links a { font-size: 14px; transition: color var(--transition); }
.footer__links a:hover { color: var(--gold); }
.footer__contact li { font-size: 14px; margin-bottom: 10px; }
.footer__contact i { color: var(--gold); width: 20px; margin-right: 8px; }
.footer__newsletter { text-align: center; padding: 32px 0; border-top: 1px solid var(--black-light); border-bottom: 1px solid var(--black-light); }
.footer__newsletter h4 { font-family: var(--font-heading); font-size: 18px; color: var(--white); margin-bottom: 16px; }
.newsletter-form { display: flex; max-width: 440px; margin: 0 auto; gap: 0; }
.newsletter-form input { flex: 1; padding: 12px 20px; background: var(--black-soft); border: 1px solid var(--black-light); border-radius: 100px 0 0 100px; color: var(--white); outline: none; font-size: 14px; }
.newsletter-form input:focus { border-color: var(--gold); }
.newsletter-form button { padding: 12px 24px; background: var(--gold); color: var(--black); font-weight: 600; border: none; border-radius: 0 100px 100px 0; font-size: 14px; cursor: pointer; transition: background var(--transition); }
.newsletter-form button:hover { background: var(--gold-light); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; font-size: 13px; }
.footer__payment { display: flex; gap: 12px; font-size: 24px; color: var(--text-light); }

/* --- WhatsApp Button --- */
.whatsapp-btn { position: fixed; bottom: 24px; right: 24px; width: 60px; height: 60px; background: #25D366; color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; box-shadow: 0 4px 20px rgba(37,211,102,0.4); z-index: 999; transition: transform var(--transition); }
.whatsapp-btn:hover { transform: scale(1.1); }

/* --- Error Page --- */
.section--404 { padding: 100px 0; }
.error-page__code { font-family: var(--font-heading); font-size: 120px; color: var(--gold); line-height: 1; display: block; }
.error-page__title { font-family: var(--font-heading); font-size: 32px; margin: 16px 0; }
.error-page__text { color: var(--text-muted); margin-bottom: 32px; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .products-grid, .guarantees-grid { grid-template-columns: repeat(3, 1fr); }
    .footer__grid { grid-template-columns: repeat(2, 1fr); }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .top-bar__left { display: none; }
    .header__search { display: none; }
    .header__menu-toggle { display: block; }
    .header__action--search-mobile { display: flex; }
    .nav { display: none; position: fixed; top: 0; left: 0; width: 80%; height: 100vh; background: var(--black); z-index: 1001; overflow-y: auto; padding-top: 60px; }
    .nav.nav--open { display: block; }
    .nav__list { flex-direction: column; }
    .nav__link { padding: 16px 24px; font-size: 15px; border-bottom: 1px solid var(--black-light); }
    .nav__submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: var(--black-soft); }
    .nav__submenu li a { color: var(--white); border-color: var(--black-light); padding-left: 40px; }
    .hero-slide { min-height: 400px; }
    .hero-slide__title { font-size: 28px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .category-card__image { width: 100px; height: 100px; }
    .guarantees-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .footer__grid { grid-template-columns: 1fr; gap: 32px; }
    .footer__bottom { flex-direction: column; gap: 12px; text-align: center; }
    .newsletter-form { flex-direction: column; gap: 8px; }
    .newsletter-form input { border-radius: 100px; }
    .newsletter-form button { border-radius: 100px; }
    .section__title { font-size: 24px; }
}
@media (max-width: 480px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .product-card__info { padding: 10px; }
    .product-card__name { font-size: 13px; }
    .product-card__price-current { font-size: 15px; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
}
