/* 
   =========================================
   Variables y Configuración Base
   Paleta extraída e inspirada en Joyería Rimini 
   (#A88F59 - Dorado principal, #212529 oscuro)
   ========================================= 
*/
:root {
    --primary-color: #A88F59;       /* Dorado Rímini */
    --primary-hover: #8f7847;       /* Dorado Oscuro */
    --secondary-color: #212529;     /* Gris oscuro casi negro */
    --text-color: #333333;          /* Texto general */
    --light-bg: #f9f9f9;            /* Fondo claro */
    --white: #ffffff;
    --border-color: #e5e5e5;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    
    --transition-fast: 0.3s ease;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

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

.mt-4 {
    margin-top: 2rem;
}

/* 
   =========================================
   Botones
   ========================================= 
*/
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 0; /* Sharp corners */
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

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

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

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-outline-light {
    background-color: transparent;
    border: 1px solid var(--white);
    color: var(--white);
}

.btn-outline-light:hover {
    background-color: var(--white);
    color: var(--secondary-color);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1rem;
}

/* 
   =========================================
   Top Bar & Header
   ========================================= 
*/
.top-bar {
    background-color: #000000;
    color: var(--white);
    padding: 10px 0;
    font-size: 0.8rem;
    letter-spacing: 2px;
    position: relative;
    z-index: 1001;
    overflow: hidden;
    white-space: nowrap;
}

.top-bar .container {
    overflow: hidden; /* Ensure text doesn't overflow container */
}

.top-bar p {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 25s linear infinite;
    margin: 0;
}

@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* Dynamic Header */
.main-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    position: absolute;
    width: 100%;
    top: 35px; /* Below top-bar */
    z-index: 1000;
    transition: all 0.4s ease;
}

.main-header.scrolled {
    position: fixed;
    top: 0;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.main-header.scrolled .header-container {
    height: 65px;
}

/* Logo Colors */
.logo a {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.main-header.scrolled .logo a {
    color: var(--secondary-color);
}

/* Nav Colors */
.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--white);
    transition: color 0.3s ease;
}

.main-header.scrolled .main-nav a {
    color: var(--secondary-color);
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* Action Buttons Colors */
.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.action-btn {
    font-size: 1.2rem;
    color: var(--white);
    position: relative;
    transition: color 0.3s ease;
}

.main-header.scrolled .action-btn {
    color: var(--secondary-color);
}

.cart-btn .cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--white);
}
.main-header.scrolled .mobile-menu-toggle {
    color: var(--secondary-color);
}

/* 
   =========================================
   Hero Carousel
   ========================================= 
*/
.hero-carousel {
    position: relative;
    height: 85vh;
    min-height: 600px;
    overflow: hidden;
}

.carousel-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-item {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.carousel-item.active {
    opacity: 1;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 800px;
    padding: 0 20px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease 0.3s;
}

.carousel-item.active .hero-content {
    transform: translateY(0);
    opacity: 1;
}

.hero-content h1 {
    color: var(--white);
    font-size: 4.5rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    font-weight: 300;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255,255,255,0.2);
    color: var(--white);
    border: none;
    width: 50px; height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-control:hover {
    background: rgba(255,255,255,0.4);
}

.carousel-control.prev { left: 20px; }
.carousel-control.next { right: 20px; }

.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
}

.carousel-indicators .dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-indicators .dot.active {
    background: var(--white);
}

/* 
   =========================================
   Best Sellers
   ========================================= 
*/
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-header p {
    color: #666;
    font-size: 1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.product-card {
    text-align: center;
    group: hover;
}

.product-image {
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: 4px;
    aspect-ratio: 1 / 1;
    background-color: var(--light-bg);
}

.img-placeholder {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

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

.product-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    transition: bottom 0.3s ease;
    padding: 10px;
}

.product-card:hover .product-actions {
    bottom: 0;
}

.product-actions .btn {
    width: 100%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.product-info h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.product-info .price {
    font-weight: 600;
    color: var(--primary-color);
}

/* 
   =========================================
   Categories (Split Section)
   ========================================= 
*/
.categories-section {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.category-block {
    flex: 1 1 50%;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-block::before {
    content: '';
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.3);
    transition: background 0.3s ease;
}

.category-block:hover::before {
    background: rgba(0,0,0,0.5);
}

.category-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
}

.category-content h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

/* 
   =========================================
   Features Section
   ========================================= 
*/
.features-section {
    background-color: var(--light-bg);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: center;
}

.feature-item i {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.feature-item p {
    color: #666;
    font-size: 0.95rem;
}

/* 
   =========================================
   Custom Banner
   ========================================= 
*/
.custom-jewelry-banner {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.custom-jewelry-banner h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.custom-jewelry-banner p {
    max-width: 700px;
    margin: 0 auto 30px;
    font-weight: 300;
}

/* 
   =========================================
   Footer
   ========================================= 
*/
.main-footer {
    background-color: var(--secondary-color);
    color: #cccccc;
    padding: 60px 0 0;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul a {
    color: #cccccc;
    font-size: 0.9rem;
}

.footer-column ul a:hover {
    color: var(--primary-color);
}

.footer-column p {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    color: var(--white);
    font-size: 1.2rem;
    background: rgba(255,255,255,0.1);
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.social-links a:hover {
    background: var(--primary-color);
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 0;
    font-family: var(--font-body);
}

.newsletter-form .btn {
    border-radius: 0;
    padding: 10px 15px;
}

.footer-bottom {
    background-color: #1a1d20;
    padding: 20px 0;
    text-align: center;
    font-size: 0.8rem;
}

/* 
   =========================================
   Responsive
   ========================================= 
*/
@media (max-width: 992px) {
    .main-nav {
        display: none; /* Se activará por JS */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .main-nav a {
        color: var(--secondary-color);
    }
    
    .main-header.scrolled .main-nav a {
        color: var(--secondary-color);
    }

    .mobile-menu-toggle {
        display: block;
        order: -1;
    }

    .header-container {
        justify-content: space-between;
    }

    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .category-block {
        flex: 1 1 100%;
    }
    .hero-section {
        min-height: 400px;
        height: 60vh;
    }
}
