/* --- DESIGN VARIABLES & GENERAL STYLES --- */
:root {
    --primary-color: #6b4f43;
    --secondary-color: #d4ac8e;
    --accent-color: #f5efe8;
    --text-color: #333333;
    --border-color: #e5e5e5;
    --white: #fff;
    --black: #000;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --font-headings: 'Playfair Display', serif;
    --font-body: 'Roboto', sans-serif;
    --shadow: 0 4px 15px rgba(0,0,0,0.07);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    font-size: clamp(15px, 1vw, 16px);
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3, h4 {
    font-family: var(--font-headings);
    color: var(--primary-color);
}
h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

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

img {
    max-width: 100%;
    display: block;
}

section {
    padding: 80px 0;
}

.important-note {
  font-weight: bold;
  color: #8B4513; /* A strong but elegant brown, like coffee */
}

/* --- BUTTONS & FORMS --- */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
}

/* =================================================================== */
/* HEADER STYLES */
/* =================================================================== */
.main-header {
    padding: 10px 0;
    background-color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.header-left-cluster {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo img {
    max-height: 100px;
    transition: max-height 0.3s ease;
}

.main-header.scrolled .logo img {
    max-height: 80px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-nav a {
    position: relative;
    font-weight: 500;
    padding: 5px 0;
    font-size: 1.1rem;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-color);
    left: 0;
    bottom: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: scaleX(1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--danger-color);
    color: var(--white);
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border: 2px solid white;
}

/* =================================================================== */
/* CART PREVIEW STYLES */
/* =================================================================== */
.cart-container {
    position: relative;
}

.cart-preview {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    padding: 20px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.cart-container:hover .cart-preview {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cart-preview h4 {
    margin-top: 0;
    text-align: center;
    margin-bottom: 20px;
}

.cart-preview-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.cart-preview-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-preview-item-info h5 {
    margin: 0 0 5px;
    font-size: 1rem;
}

.cart-preview-item-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #777;
}

.cart-preview .btn {
    width: 100%;
    margin-top: 10px;
}

/* =================================================================== */
/* HERO SECTION STYLES */
/* =================================================================== */
.hero {
    min-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-image: url('images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    color: var(--white);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    margin-bottom: 15px;
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* =================================================================== */
/* PAGE HEADER STYLES (WITH BACKGROUND IMAGE) */
/* =================================================================== */
.page-header {
    position: relative;
    padding: 80px 0;
    text-align: center;
    color: var(--white);
    background-image: url('images/hero-background.jpg'); 
    background-size: cover;
    background-position: center;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.page-header h1 {
    position: relative;
    z-index: 2;
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

/* =================================================================== */
/* SHOP / PRODUCT GRID STYLES */
/* =================================================================== */
#product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.product-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.product-card .product-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

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

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

.product-card .product-info {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card .product-info h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
}

.product-card .product-info .price {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.product-card .add-to-cart-btn {
    margin-top: auto;
    width: 100%;
}

.product-card .order-notice {
    font-size: 0.8em;
    color: #666;
    margin-top: 8px;
    line-height: 1.3;
}

/* =================================================================== */
/* GALLERY PAGE STYLES (MOBILE-FIRST) */
/* =================================================================== */

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

/* Default mobile styles: 2 columns */
#gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* Container for each item (image or video) */
#gallery-grid > *, 
#gallery-grid a {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    aspect-ratio: 1 / 1;
    animation: fadeIn 0.6s ease-out forwards;
}

/* Image and video styles */
#gallery-grid img,
#gallery-grid video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

#gallery-grid a:hover img {
    transform: scale(1.05);
}

/* Tablet styles: 3 columns */
@media (min-width: 768px) {
    #gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

/* Desktop styles: 4 columns */
@media (min-width: 1024px) {
    #gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =================================================================== */
/* PRODUCT DETAIL PAGE STYLES */
/* =================================================================== */

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 4rem 0;
}

.product-image-column img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-details-column h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.product-details-column .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-details-column .stock-status {
    font-weight: 500;
    color: var(--success-color);
    margin-bottom: 1.5rem;
}

.product-details-column .description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

#product-options-form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.option-group {
    display: flex;
    flex-direction: column;
}

.option-label {
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #333;
}

.radio-buttons, .checkbox-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.radio-buttons input[type="radio"],
.checkbox-buttons input[type="checkbox"] {
    display: none;
}

.radio-label, .checkbox-label {
    padding: 10px 18px;
    border: 1px solid #ddd;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 0.9em;
}

.radio-buttons input[type="radio"]:checked + .radio-label {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

.checkbox-buttons input[type="checkbox"]:checked + .checkbox-label {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.validation-message {
    font-size: 0.85em;
    color: #888;
    margin-top: 8px;
}

.add-to-cart-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.quantity-input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    max-width: 100px;
    font-size: 1em;
}

.total-price-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: 1.1em;
    font-weight: 500;
}

.total-price-value {
    font-size: 1.5em;
    font-weight: 700;
    color: #c48f56;
}

.add-to-cart-btn {
    width: 100%;
}

.product-extra-info {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.product-extra-info h3 {
    margin-bottom: 0.5rem;
}

/* =================================================================== */
/* CART PAGE STYLES */
/* =================================================================== */

.cart-section {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.cart-section h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    color: #888;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 500;
}

.cart-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.cart-item-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.cart-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cart-item-details h4 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.cart-item-details .item-price {
    color: #666;
    margin-bottom: auto;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-item-actions .quantity-input {
    width: 60px;
    padding: 5px;
    text-align: center;
}

.cart-item-actions .remove-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

.cart-item-total {
    font-size: 1.1rem;
    font-weight: 500;
    min-width: 80px;
    text-align: right;
}

.cart-summary {
    background-color: var(--accent-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    position: sticky;
    top: 120px;
}

.cart-summary h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: center;
}

.summary-row, .summary-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.cart-summary hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 1rem 0;
}

.summary-total {
    font-size: 1.25rem;
    font-weight: 700;
}

.summary-total span:last-child {
    color: var(--primary-color);
}

.cart-summary .btn {
    width: 100%;
    margin-top: 1rem;
    padding: 15px;
}

.payment-note {
    font-size: 0.85rem;
    color: #777;
    text-align: center;
    margin-top: 1.5rem;
}

.empty-cart {
    text-align: center;
    padding: 4rem 0;
}


/* =================================================================== */
/* CHECKOUT PAGE STYLES */
/* =================================================================== */
.checkout-section {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.customer-details h2, .order-summary h2 {
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: #555;
}


/* =================================================================== */
/* FOOTER STYLES */
/* =================================================================== */
.main-footer {
    background-color: #f5efe8;
    color: #6b4f43;
    padding: 60px 0 0;
    border-top: 1px solid #e5e5e5;
}

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

.footer-column h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
}

.footer-logo {
    max-width: 150px;
    margin-bottom: 15px;
}

.footer-about p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: #6b4f43;
    transition: transform 0.3s ease;
}

.social-icons a:hover {
    transform: translateY(-3px);
}

.social-icons svg {
    width: 24px;
    height: 24px;
}

.footer-links ul {
    list-style: none;
}

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

.footer-links a {
    color: #6b4f43;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #333;
    text-decoration: underline;
}

.footer-contact p {
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-contact a {
    color: #6b4f43;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
}

.newsletter-form .btn {
    width: 100%;
}

.footer-bottom {
    border-top: 1px solid #e5e5e5;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}


/* =================================================================== */
/* RESPONSIVE STYLES */
/* =================================================================== */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 9999;
}
.mobile-nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 9998;
    padding-top: 100px;
    transform: translateX(100%);
    transition: transform 0.4s ease;
}
.mobile-nav.active {
    transform: translateX(0);
}
.mobile-nav ul {
    list-style: none;
}
.mobile-nav ul li a {
    display: block;
    padding: 15px 30px;
    font-size: 18px;
}

@media (max-width: 768px) {
    /* General Mobile Adjustments */
    section {
        padding: 60px 0;
    }

    /* Header & Navigation */
    .main-nav {
        display: none;
    }
    .mobile-nav-toggle {
        display: block;
    }
    .mobile-nav {
        display: block;
    }
    .logo img {
        max-height: 80px;
    }
    .main-header {
        padding: 10px 0;
    }
    .main-header.scrolled .logo img {
        max-height: 65px;
    }
    .header-left-cluster {
        gap: 20px;
    }

    /* Hero Section Background */
    .hero {
        background-attachment: scroll;
    }

    /* Product Detail Page */
    .product-detail-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 0;
    }
    .product-details-column h1 {
        font-size: 2rem;
    }

    /* Cart & Checkout Pages */
    .cart-layout, .checkout-layout {
        grid-template-columns: 1fr;
    }
    .cart-summary {
        position: static;
    }
    .customer-details {
        order: 2;
    }
    .cart-summary-column {
        order: 1;
    }
}


/* =================================================================== */
/* TOAST NOTIFICATION STYLES */
/* =================================================================== */
#toast-notification {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 2000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.5s, bottom 0.5s;
}

#toast-notification.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

/* =================================================================== */
/* ARREGLO PARA VIDEOS NEGROS EN LIGHTBOX */
/* =================================================================== */
.fancybox__slide video {
    -webkit-transform: translateZ(0); /* Para navegadores como Chrome y Safari */
    transform: translateZ(0); /* Estándar */
    backface-visibility: hidden; /* Ayuda a prevenir parpadeos */
}

/* --- Estilos Profesionales para Selección de Sabores --- */

.flavor-quantity-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 12px 15px; /* Un poco más de padding vertical */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #fff;
    /* --- MEJORA: Transición suave --- */
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

/* --- MEJORA: Efecto Hover sutil --- */
.flavor-quantity-group:hover {
    background-color: #fcfcfc;
    border-color: #ccc;
}

.flavor-quantity-group label {
    font-weight: 500;
    color: #333;
}

.flavor-quantity-group input {
    width: 70px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    font-size: 1.1rem; /* Un poco más grande para mejor lectura */
    /* --- MEJORA: Transición para el foco --- */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* --- MEJORA: Resaltado al hacer clic en el input --- */
.flavor-quantity-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 79, 67, 0.15);
}

.total-quantity-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* --- MEJORA: Hacer que el número total resalte más --- */
#total-quantity-display {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary-color);
} 

/* --- Estilos para Checkout Interactivo --- */
.summary-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.summary-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.summary-item-header p {
    margin: 0;
    font-weight: 500;
}

.summary-item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.item-total-price {
    font-weight: 500;
    white-space: nowrap;
}

.delete-item-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 5px;
    color: #888;
}

.delete-item-btn:hover {
    color: #c0392b;
}

.flavor-edit-list {
    list-style-type: none;
    padding-left: 15px;
    margin: 0;
}

.flavor-edit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 0.9em;
    color: #555;
}

.flavor-qty-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px;
}

/* ============================================= */
/* --- Estilos para Carrito Interactivo Profesional --- */
/* ============================================= */

/* Contenedor principal de cada producto en el carrito */
.cart-item {
    display: flex;
    align-items: flex-start; /* Alinear verticalmente arriba */
    gap: 15px; /* Espacio entre imagen, detalles y acciones */
    padding: 20px 0;
    border-bottom: 1px solid #eaeaea;
}

.cart-item-image img {
    width: 90px;
    height: 90px;
    object-fit: cover; /* Asegura que la imagen no se deforme */
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

/* Sección central con el nombre y los sabores */
.cart-item-details {
    flex-grow: 1; /* Permite que esta sección ocupe el espacio disponible */
}

.cart-item-details h4 {
    margin: 0 0 12px 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
}

/* Lista de sabores editables */
.flavor-breakdown-editable {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px; /* Espacio entre cada sabor */
}

/* Cada fila de sabor (nombre + input) */
.cart-flavor-item {
    display: flex;
    justify-content: space-between; /* Alinea el nombre a la izq. y el input a la der. */
    align-items: center;
    font-size: 0.9em;
    color: #555;
}

/* Input para la cantidad de sabor */
.flavor-qty-input-cart {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 6px;
    font-size: 0.9em;
    margin-left: 10px; /* Espacio entre el nombre y el campo */
}

/* Columna derecha con el botón de eliminar, cantidad y total */
.cart-item-actions-total {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end; /* Alinea todo a la derecha */
    min-height: 90px; /* Misma altura que la imagen para consistencia */
}

/* Botón para eliminar */
.delete-item-btn-cart {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem; /* Icono más grande y fácil de clickear */
    padding: 0;
    color: #aaa;
    transition: color 0.2s ease; /* Transición suave de color */
}

.delete-item-btn-cart:hover {
    color: #e74c3c; /* Color rojo al pasar el mouse */
}

/* Total del producto */
.cart-item-total {
    text-align: right;
}

.cart-item-total p {
    margin: 0 0 4px 0;
    font-size: 0.9em;
    color: #666;
}

.cart-item-total strong {
    font-size: 1.15rem;
    font-weight: 500;
    color: #2c3e50;
}

/* --- Cambios para la página de detalle de producto --- */

/* 1. Oculta la descripción pequeña (la que dice 'cannoli') */
#product-description {
  display: none;
}

/* 2. Centra el título principal 'Cannoli' */
#product-name {
  text-align: center;
}

/* Esto centrará cualquier título h3 dentro de la cuadrícula de productos */
#product-grid h3 {
  text-align: center;
}

/* --- Estilos para la foto de Catering (Corregido) --- */

.catering-photo-section {
    padding: 30px 0; /* Añade espacio arriba y abajo de la foto */
}

.catering-image-display {
    /* ⬇️ ESTO ES LO QUE CENTRA ⬇️ */
    display: block;     /* Trata la imagen como un bloque */
    margin-left: auto;  /* Margen automático a la izquierda */
    margin-right: auto; /* Margen automático a la derecha */

    /* ⬇️ ESTO LA HACE RESPONSIVA ⬇️ */
    width: 100%;      /* Ocupa el 100% de su contenedor (hasta el límite) */
    max-width: 900px; /* Límite para que no sea GIGANTE en ordenadores */
    
    /* --- Estilos extra --- */
    height: auto;     /* Mantiene la proporción de la imagen */
    border-radius: 8px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
}