:root {
    --ddt-cream: #fff7dc;
    --ddt-cream-soft: #fffaf0;
    --ddt-green: #8ca67b;
    --ddt-green-dark: #657d57;
    --ddt-brown: #7a3f20;
    --ddt-brown-dark: #572711;
    --ddt-text: #2d1c14;
    --ddt-muted: #6f665e;
    --ddt-border: #ead9b6;
    --ddt-white: #ffffff;
    --ddt-shadow: 0 14px 35px rgba(87, 39, 17, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--ddt-cream-soft);
    color: var(--ddt-text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

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

a:hover,
a:focus {
    color: var(--ddt-green-dark);
}

img {
    max-width: 100%;
    height: auto;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.ddt-container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.ddt-site-header {
    padding: 14px 10px 20px;
    background: var(--ddt-cream-soft);
}

.ddt-header-panel {
    width: min(1220px, 100%);
    margin: 0 auto;
    background: linear-gradient(180deg, #fff9e7, var(--ddt-cream));
    border: 1px solid var(--ddt-border);
    border-radius: 28px;
    padding: 24px clamp(18px, 4vw, 42px) 22px;
    box-shadow: var(--ddt-shadow);
    text-align: center;
}

.ddt-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 14px;
}

.ddt-logo-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.ddt-logo {
    width: min(180px, 48vw);
    max-height: 138px;
    object-fit: contain;
    display: block;
}

.ddt-category-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 8px 0 20px;
}

.ddt-category-link {
    color: var(--ddt-brown-dark);
    font-size: 15px;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 999px;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.ddt-category-link:hover,
.ddt-category-link:focus,
.ddt-category-link.is-active {
    background: var(--ddt-green);
    color: var(--ddt-white);
    transform: translateY(-1px);
}

.ddt-social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.ddt-social-links a {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ddt-brown);
    color: var(--ddt-white);
    font-weight: 800;
    border: 1px solid transparent;
    box-shadow: 0 6px 15px rgba(87, 39, 17, .13);
}

.ddt-social-links a:nth-child(1),
.ddt-social-links a:nth-child(2) {
    background: var(--ddt-white);
    color: var(--ddt-brown);
    border-color: var(--ddt-border);
}

.ddt-social-links a:hover,
.ddt-social-links a:focus {
    background: var(--ddt-green);
    color: var(--ddt-white);
}

.ddt-search-form {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    width: min(980px, 100%);
    margin: 0 auto;
    background: var(--ddt-white);
    border: 1px solid var(--ddt-green);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(101, 125, 87, 0.10);
}

.ddt-search-icon {
    color: var(--ddt-green-dark);
    font-size: 24px;
    padding-left: 24px;
}

.ddt-search-form input[type="search"] {
    width: 100%;
    min-height: 58px;
    border: 0;
    outline: none;
    padding: 0 10px;
    color: var(--ddt-text);
    font-size: 16px;
    background: transparent;
}

.ddt-search-form button {
    min-height: 58px;
    padding: 0 36px;
    border: 0;
    background: var(--ddt-brown);
    color: var(--ddt-white);
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: background .2s ease;
}

.ddt-search-form button:hover,
.ddt-search-form button:focus {
    background: var(--ddt-green-dark);
}

.ddt-site-main {
    min-height: 50vh;
}

.ddt-hero {
    width: min(1220px, calc(100% - 20px));
    margin: 0 auto 34px;
    min-height: 390px;
    border-radius: 0 0 30px 30px;
    background: linear-gradient(135deg, rgba(43, 72, 39, .78), rgba(122, 63, 32, .55)), url('../images/logo-ding-dong.png');
    background-color: #2f3c27;
    background-size: 280px, 280px;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    color: var(--ddt-white);
    box-shadow: var(--ddt-shadow);
}

.ddt-hero-overlay {
    max-width: 760px;
}

.ddt-hero h1 {
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    margin: 0 0 14px;
    letter-spacing: -1px;
}

.ddt-hero p {
    font-size: clamp(17px, 2vw, 22px);
    margin: 0 auto 26px;
    max-width: 680px;
}

.ddt-section {
    padding: 34px 0;
}

.ddt-section h1,
.ddt-section h2,
.ddt-page-title {
    margin-top: 0;
    color: var(--ddt-brown-dark);
    line-height: 1.15;
}

.ddt-page-title {
    font-size: clamp(32px, 5vw, 54px);
    margin-bottom: 10px;
}

.ddt-page-subtitle {
    color: var(--ddt-muted);
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 24px;
}

.ddt-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
}

.ddt-section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
}

.ddt-category-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.ddt-category-card {
    display: block;
    background: var(--ddt-white);
    border: 1px solid var(--ddt-border);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 10px 26px rgba(87, 39, 17, .07);
    min-height: 128px;
}

.ddt-category-card span {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--ddt-brown-dark);
    margin-bottom: 8px;
}

.ddt-category-card small {
    display: block;
    color: var(--ddt-muted);
    font-size: 14px;
}

.ddt-category-card:hover,
.ddt-category-card:focus {
    border-color: var(--ddt-green);
    transform: translateY(-2px);
}

.ddt-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin-top: 26px;
}

.ddt-product-card {
    background: var(--ddt-white);
    border: 1px solid var(--ddt-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(87, 39, 17, .08);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}

.ddt-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(87, 39, 17, .14);
}

.ddt-product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: #fffaf0;
    overflow: hidden;
}

.ddt-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.ddt-product-placeholder {
    color: var(--ddt-muted);
    font-weight: 700;
}

.ddt-product-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ddt-product-title {
    font-size: 19px;
    margin: 0 0 8px;
}

.ddt-product-title a {
    color: var(--ddt-brown-dark);
}

.ddt-product-price {
    color: var(--ddt-green-dark);
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 16px;
}

.ddt-product-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.ddt-btn,
.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 800;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.ddt-btn-main,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    background: var(--ddt-brown);
    color: var(--ddt-white);
}

.ddt-btn-main:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
    background: var(--ddt-green-dark);
    color: var(--ddt-white);
}

.ddt-btn-light {
    background: #f8efe1;
    color: var(--ddt-brown-dark);
    border-color: var(--ddt-border);
}

.ddt-btn-light:hover {
    background: var(--ddt-green);
    color: var(--ddt-white);
}

.ddt-stock-label {
    color: var(--ddt-muted);
    font-weight: 700;
}

.ddt-empty-products,
.ddt-page-content,
.ddt-post-card {
    background: var(--ddt-white);
    border: 1px solid var(--ddt-border);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 12px 30px rgba(87, 39, 17, .08);
}

.ddt-pagination {
    margin-top: 28px;
    text-align: center;
}

.ddt-pagination .page-numbers {
    display: inline-flex;
    min-width: 40px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    margin: 4px;
    border-radius: 999px;
    background: var(--ddt-white);
    border: 1px solid var(--ddt-border);
    color: var(--ddt-brown);
    font-weight: 700;
}

.ddt-pagination .page-numbers.current {
    background: var(--ddt-green);
    color: var(--ddt-white);
}

.ddt-site-footer {
    background: var(--ddt-brown-dark);
    color: #fdf6e8;
    margin-top: 40px;
    padding: 46px 0 0;
}

.ddt-footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
}

.ddt-footer-logo {
    width: 150px;
    background: var(--ddt-cream);
    border-radius: 16px;
    padding: 8px;
}

.ddt-site-footer h2 {
    margin-top: 0;
    color: #fff4c7;
    font-size: 20px;
}

.ddt-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
}

.ddt-footer-list li {
    margin: 0 0 8px;
}

.ddt-site-footer a {
    color: #fff4c7;
}

.ddt-site-footer a:hover,
.ddt-site-footer a:focus {
    color: var(--ddt-green);
}

.ddt-social-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ddt-footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, .14);
    margin-top: 36px;
    padding: 18px;
    color: #ead9b6;
}

.ddt-whatsapp-float {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 50;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}

.ddt-whatsapp-float::before {
    content: '☎';
    font-size: 28px;
    font-weight: 800;
}

.woocommerce div.product {
    background: var(--ddt-white);
    border: 1px solid var(--ddt-border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(87, 39, 17, .08);
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    border-radius: 16px;
    background: var(--ddt-white);
    border-top-color: var(--ddt-green);
}

@media (max-width: 980px) {
    .ddt-product-grid,
    .ddt-category-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ddt-footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ddt-site-header {
        padding: 8px;
    }

    .ddt-header-panel {
        border-radius: 22px;
        padding: 18px 12px;
    }

    .ddt-category-menu {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }

    .ddt-category-link {
        white-space: nowrap;
        font-size: 14px;
        padding: 9px 12px;
    }

    .ddt-search-form {
        grid-template-columns: auto 1fr;
        border-radius: 24px;
    }

    .ddt-search-form button {
        grid-column: 1 / -1;
        width: 100%;
        border-radius: 0;
    }

    .ddt-product-grid,
    .ddt-category-cards {
        grid-template-columns: 1fr;
    }

    .ddt-hero {
        min-height: 310px;
        border-radius: 24px;
    }
}

/* Ajustes WooCommerce: carrito y recomendaciones */
.woocommerce-cart .ddt-section,
.woocommerce-checkout .ddt-section,
.woocommerce-account .ddt-section {
    padding-top: 26px;
}

.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content,
.woocommerce-account .entry-content,
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce,
.woocommerce-account .woocommerce {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.woocommerce-cart table.shop_table,
.woocommerce-checkout table.shop_table,
.woocommerce-cart .cart_totals,
.woocommerce-checkout #customer_details,
.woocommerce-checkout #order_review,
.woocommerce-account .woocommerce-MyAccount-content,
.woocommerce-account .woocommerce-MyAccount-navigation {
    background: var(--ddt-white);
    border: 1px solid var(--ddt-border);
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(87, 39, 17, .08);
    overflow: hidden;
}

.woocommerce-cart table.shop_table th,
.woocommerce-cart table.shop_table td,
.woocommerce-checkout table.shop_table th,
.woocommerce-checkout table.shop_table td {
    padding: 16px;
}

.woocommerce-cart .cart_totals {
    padding: 20px;
}

.woocommerce-cart .cart_totals h2,
.woocommerce-cart h1,
.woocommerce-cart h2,
.woocommerce-checkout h1,
.woocommerce-checkout h2 {
    color: var(--ddt-brown-dark);
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    width: 100%;
    border-radius: 999px;
    background: var(--ddt-brown);
    color: var(--ddt-white);
    padding: 14px 22px;
    font-weight: 800;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:focus {
    background: var(--ddt-green-dark);
    color: var(--ddt-white);
}

.ddt-cart-related-products {
    width: min(1180px, calc(100% - 32px));
    margin: 44px auto 10px;
    padding: 28px;
    background: linear-gradient(180deg, #fff9e7, var(--ddt-cream));
    border: 1px solid var(--ddt-border);
    border-radius: 28px;
    box-shadow: var(--ddt-shadow);
}

.ddt-cart-related-products .ddt-section-heading {
    align-items: flex-start;
}

.ddt-cart-related-products .ddt-section-heading p {
    margin: 8px 0 0;
    color: var(--ddt-muted);
}

.ddt-cart-related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.woocommerce-cart .product-thumbnail img {
    border-radius: 14px;
}

.woocommerce-cart .quantity .qty {
    min-height: 40px;
    border: 1px solid var(--ddt-border);
    border-radius: 999px;
    text-align: center;
}

/* Previene logos gigantes cuando WooCommerce o un bloque reutilizable cargan el logo fuera del encabezado del tema. */
.wp-site-blocks .custom-logo,
.wp-block-site-logo img,
.site-logo img,
.custom-logo-link img {
    max-width: 190px;
    height: auto;
}

@media (max-width: 980px) {
    .ddt-cart-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .woocommerce-cart .entry-content,
    .woocommerce-checkout .entry-content,
    .woocommerce-account .entry-content,
    .woocommerce-cart .woocommerce,
    .woocommerce-checkout .woocommerce,
    .woocommerce-account .woocommerce,
    .ddt-cart-related-products {
        width: min(100% - 20px, 1180px);
    }

    .ddt-cart-related-products {
        padding: 18px;
        border-radius: 22px;
    }

    .ddt-cart-related-grid {
        grid-template-columns: 1fr;
    }
}


/* Portada organizada por secciones */
.ddt-section-subtitle {
    margin: 8px 0 0;
    color: var(--ddt-muted);
    font-size: 16px;
    max-width: 680px;
}

.ddt-front-products-section:nth-of-type(even) {
    background: rgba(255, 247, 220, 0.55);
}

.ddt-product-image img {
    padding: 10px;
}

.woocommerce ul.products li.product img {
    object-fit: contain;
    background: #fffaf0;
}
