/*
Theme Name: Chocolat Postres
Theme URI: https://chocolatpostres.com.mx
Author: Antigravity
Author URI: https://chocolatpostres.com.mx
Description: Un tema elegante y moderno diseñado especialmente para un menú de postres, con integración nativa para ventas por WhatsApp y estética premium.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chocolatpostres
*/

/* 
 * CSS Variables based on Brand Colors 
 * Background: Warm Vanilla/Peach (#FCECC9)
 * Text: Milk Chocolate (#A6644B)
 * Accent: Dark Chocolate (#6B3A28)
 */
:root {
    --color-bg: #FDF4E3;
    /* Lighter version of the background for better contrast */
    --color-primary: #A6644B;
    --color-primary-hover: #8D5139;
    --color-secondary: #FCECC9;
    /* The exact background color from the image */
    --color-text-dark: #6B3A28;
    /* Darker chocolate for text readability */
    --color-text-light: #FDF4E3;
    --color-whatsapp: #25D366;
    --color-whatsapp-hover: #1ebd5a;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

.mb-8 {
    margin-bottom: 2rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Header & Nav */
.site-header {
    background-color: rgba(253, 244, 227, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(166, 100, 75, 0.1);
    padding: 1rem 0;
}

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

.site-branding .site-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary);
    margin: 0;
}

/* Hero Section */
.hero-section {
    background-color: var(--color-secondary);
    padding: 6rem 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(166, 100, 75, 0.05);
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 3.5rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-dark);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    box-shadow: 0 4px 15px rgba(166, 100, 75, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    color: var(--color-text-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(166, 100, 75, 0.4);
}

.btn-whatsapp {
    background-color: var(--color-whatsapp);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    width: 100%;
    margin-top: 1rem;
    font-size: 1.1rem;
    gap: 0.5rem;
}

.btn-whatsapp:hover {
    background-color: var(--color-whatsapp-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Products Grid */
.products-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    list-style: none;
    padding: 0;
}

.product-card {
    background: #fff;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(166, 100, 75, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(166, 100, 75, 0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-details {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

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

/* Footer */
.site-footer {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    padding: 4rem 0 2rem;
    text-align: center;
    margin-top: 6rem;
    border-radius: 3rem 3rem 0 0;
}

.site-footer p {
    opacity: 0.8;
}

/* WooCommerce Overrides */
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: var(--color-primary);
    font-size: 1.8rem;
    font-weight: 700;
}

.woocommerce-message {
    border-top-color: var(--color-primary);
    background-color: var(--color-bg);
}

.woocommerce-message::before {
    color: var(--color-primary);
}

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

/* --- Hero Video Styles --- */
.hero-has-video, .hero-has-image {
    position: relative;
    overflow: hidden;
    padding: 8rem 2rem 6rem;
    color: white;
}

@media (max-width: 768px) {
    .hero-has-video, .hero-has-image {
        padding: 2rem 2rem 6rem;
    }
    .hero-title {
        font-size: 2.5rem;
    }
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.hero-has-video .hero-title,
.hero-has-video .hero-subtitle,
.hero-has-image .hero-title,
.hero-has-image .hero-subtitle {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-btn {
    background-color: var(--color-primary);
    color: #fff;
    border: 2px solid transparent;
}


/* --- Menu List View (Mobile First) --- */
.product-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-list-card {
    display: flex;
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(166, 100, 75, 0.05);
    height: 180px;
    transition: transform 0.3s ease;
}

.product-list-content {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-list-image-container {
    width: 140px;
    flex-shrink: 0;
}

.product-list-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info-top {
    margin-bottom: auto;
}

.product-list-title a {
    font-size: 1.1rem;
    color: #333;
    font-weight: 700;
}

.product-list-title {
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.product-list-excerpt {
    font-size: 0.8rem;
    color: #777;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

/* Variations & Controls */
.variation-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.var-radio-input {
    display: none;
}

.var-radio-btn {
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--color-primary);
    border-radius: 20px;
    background: transparent;
    color: var(--color-primary);
    transition: all 0.2s;
}

.var-radio-input:checked+.var-radio-btn {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.product-list-price {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #eee;
    border-radius: 20px;
    overflow: hidden;
}

.qty-btn {
    background: #f5f5f5;
    border: none;
    padding: 0.2rem 0.6rem;
    font-weight: bold;
    color: #555;
    cursor: pointer;
}

.qty-input {
    width: 30px;
    text-align: center;
    border: none;
    font-size: 0.9rem;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart-custom-btn {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    border-radius: 20px;
}

@media (min-width: 768px) {
    .product-list-card {
        height: 220px;
    }

    .product-list-image-container {
        width: 250px;
    }

    .product-list-title a {
        font-size: 1.3rem;
    }

    .product-list-excerpt {
        font-size: 0.95rem;
        -webkit-line-clamp: 3;
    }

    .var-radio-btn {
        font-size: 0.85rem;
        padding: 0.3rem 0.8rem;
    }

    .add-to-cart-custom-btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* --- WooCommerce Cart & Checkout (Mobile App Style) --- */

/* Cart Table to Cards */
@media screen and (max-width: 768px) {

    .woocommerce table.shop_table_responsive,
    .woocommerce-page table.shop_table_responsive {
        border-collapse: separate;
        border-spacing: 0 1rem;
        border: none;
    }

    .woocommerce table.shop_table_responsive tr {
        display: block;
        background: #fff;
        border-radius: 1rem;
        box-shadow: 0 5px 15px rgba(166, 100, 75, 0.05);
        padding: 1rem;
        border: none;
        margin-bottom: 1rem;
    }

    .woocommerce table.shop_table_responsive td {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        border: none;
        padding: 0.5rem 0 !important;
    }

    .woocommerce table.shop_table_responsive td.product-remove {
        position: absolute;
        top: 1rem;
        right: 1rem;
        border: none;
        padding: 0 !important;
    }

    .woocommerce table.shop_table_responsive td.product-thumbnail {
        display: block !important;
        text-align: center;
        margin-bottom: 1rem;
    }

    .woocommerce table.shop_table_responsive td.product-thumbnail img {
        border-radius: 0.5rem;
        width: 80px;
        height: auto;
    }
}

/* Forms and Inputs */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 0.5rem;
    padding: 0.8rem 1rem;
    width: 100%;
    color: var(--color-text-dark);
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
    border-color: var(--color-primary);
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(166, 100, 75, 0.1);
}

.woocommerce-invalid input.input-text {
    border-color: #e2401c !important;
}

/* Order Review Section (Checkout) */
#order_review {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(166, 100, 75, 0.05);
    margin-top: 2rem;
}

#order_review_heading {
    font-size: 1.5rem;
    margin-top: 2rem;
    border-bottom: 2px solid var(--color-secondary);
    padding-bottom: 0.5rem;
}

.woocommerce-checkout #payment {
    background: transparent;
    border-radius: 1rem;
}

.woocommerce-checkout #payment div.payment_box {
    background-color: var(--color-secondary);
    color: var(--color-text-dark);
    border-radius: 0.5rem;
}

.woocommerce-checkout #payment div.payment_box::before {
    border-bottom-color: var(--color-secondary);
}

.woocommerce-checkout #payment ul.payment_methods {
    border-bottom: none;
    padding: 1rem 0;
}

.woocommerce #place_order {
    background-color: var(--color-primary);
    color: white;
    border-radius: 50px;
    padding: 1rem;
    font-size: 1.2rem;
    width: 100%;
    margin-top: 1rem;
    font-family: var(--font-heading);
    box-shadow: 0 4px 15px rgba(166, 100, 75, 0.3);
}

.woocommerce #place_order:hover {
    background-color: var(--color-primary-hover);
}

/* Base blocks reset (in case blocks are used) */
.wc-block-cart__submit-container,
.wc-block-checkout__actions_row {
    margin-top: 2rem;
}


.wc-block-components-button {
    background-color: var(--color-primary) !important;
    color: white !important;
    border: none;
}