/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Colors */
    --primary-color: #D4A5A5; /* Rosy Brown Refined */
    --primary-dark: #B98686;
    --secondary-color: #FDFBF7; /* Cream Background */
    --text-color: #555555;
    --heading-color: #333333;
    --white: #ffffff;
    --dark: #222222;
    --gold: #D4AF37;
    --success: #6CAE75;
    
    /* Fonts */
    --font-main: 'Poppins', sans-serif;
    --font-script: 'Dancing Script', cursive;

    /* Spacing */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Shadows */
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 25px rgba(0,0,0,0.1);

    /* Transitions */
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

ul {
    list-style: none;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* =========================================
   2. UTILITIES & LAYOUT
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: var(--spacing-lg) 0;
}

.bg-light {
    background-color: var(--white);
}

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

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: var(--font-main);
    font-size: 2.5rem;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 8px auto 0;
    border-radius: 2px;
}

.section-header p {
    font-size: 1.1rem;
    color: #777;
}

/* Buttons */
.hm-btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background: white;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

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

/* =========================================
   3. HEADER & MENU
   ========================================= */
.hm-header {
    height: 80px;
    width: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.hm-header.header-scrolled {
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    width: 50px;
}

.brand-name {
    font-family: var(--font-script);
    font-size: 1.8rem;
    color: var(--heading-color);
    margin-bottom: 5px; /* Adjust alignment */
}

.hm-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-visual-link {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
}

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

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

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.hm-icon-cart a {
    position: relative;
    font-size: 1.8rem;
    color: var(--heading-color);
}

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

.hamburger-menu {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--heading-color);
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.header-menu-movil {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--white);
    z-index: 1002;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.header-menu-movil.active {
    right: 0;
}

.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.mobile-header h3 {
    font-family: var(--font-script);
    font-size: 2rem;
    color: var(--primary-color);
}

.cerrar-menu {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

.mobile-links li {
    margin-bottom: 1.5rem;
}

.mobile-links a {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--heading-color);
}

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

.mobile-footer {
    margin-top: auto;
    text-align: center;
}

.mobile-socials {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 1.5rem;
}

.mobile-socials a {
    color: var(--text-color);
}

/* =========================================
   4. HERO BANNER
   ========================================= */
.hm-banner {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.banner-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); 
    z-index: 0;
}

.banner-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    width: 100%;
}

.banner-text h1 {
    font-family: var(--font-script);
    font-size: 4.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.banner-text h1 span {
    font-family: var(--font-main);
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
}

.banner-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 500px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* =========================================
   5. CATEGORIES GRID
   ========================================= */
.hm-grid-category {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.grid-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.img-wrapper {
    height: 300px;
    overflow: hidden;
}

.img-wrapper img {
    height: 100%;
    width: 100%;
    transition: transform 0.6s ease;
}

.grid-item:hover .img-wrapper img {
    transform: scale(1.1);
}

.c-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    transform: translateY(20px);
    transition: var(--transition);
}

.grid-item:hover .c-info {
    transform: translateY(0);
}

.c-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.c-info span {
    font-size: 0.9rem;
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.grid-item:hover .c-info span {
    opacity: 1;
}

/* =========================================
   6. PRODUCTS & TABS
   ========================================= */
.tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.hm-tab-link {
    padding: 10px 25px;
    border-radius: 25px;
    background: transparent;
    border: 2px solid #EEE;
    color: #999;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.hm-tab-link.active,
.hm-tab-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tabs-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tabs-panel.tab-active {
    display: block;
}

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

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

.product-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #f0f0f0;
}

.product-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.p-portada {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.p-portada img {
    height: 100%;
    width: 100%;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}

.badge-new { background: var(--success); }
.badge-popular { background: var(--gold); }
.badge-offer { background: var(--primary-color); }

.p-info {
    padding: 20px;
}

.p-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--heading-color);
}

.p-info .description {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
    height: 40px; /* Limit height for uniform cards */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.precio-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.precio {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.old-price {
    font-size: 0.85rem;
    text-decoration: line-through;
    color: #aaa;
    display: block;
}

/* =========================================
   7. FEATURES SECTION
   ========================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.icon-box {
    width: 70px;
    height: 70px;
    background: #fdf0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--primary-color);
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--heading-color);
}

.feature-card p {
    color: #666;
}

/* =========================================
   8. FOOTER
   ========================================= */
footer {
    background: #2a2a2a;
    color: #ccc;
    padding: 4rem 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding-bottom: 3rem;
}

.dulce-footer {
    font-family: var(--font-script);
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

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

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

.footer-contact h3,
.footer-newsletter h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-contact ul li {
    margin-bottom: 1rem;
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-contact i {
    color: var(--primary-color);
}

.newsletter-form {
    display: flex;
    position: relative;
    margin-top: 1rem;
}

.newsletter-form input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 25px;
    border: none;
    outline: none;
    background: rgba(255,255,255,0.1);
    color: white;
    padding-right: 50px;
}

.btn-round {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.btn-round:hover {
    background: var(--primary-dark);
}

.footer-bottom {
    background: #222;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

.dev-credit a {
    color: var(--primary-color);
    font-weight: 500;
}

/* =========================================
   9. RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .banner-text h1 {
        font-size: 3.5rem;
    }
    
    .banner-text h1 span {
        font-size: 2rem;
    }

    .nav-links,
    .header-actions .hm-icon-cart {
        display: none;
    }

    .hamburger-menu {
        display: block;
    }
    
    .header-container {
        justify-content: space-between;
    }

    .hm-header {
        justify-content: space-between;
        padding: 0 1rem;
    }
}

@media (max-width: 600px) {
    .hm-banner {
        height: 500px;
        text-align: center;
    }

    .banner-text {
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .banner-text h1 {
        font-size: 3rem;
    }

    .banner-text h1 span {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .img-wrapper {
        height: 250px;
    }
}