/*
Theme Name: Danny's Restaurant – Sapori D'Italia Child
Theme URI: https://ditalia.fi/
Description: Conversion-focused WooCommerce child theme for Sapori D'Italia, built on Danny's Restaurant.
Author: Sapori D'Italia
Template: dannys-restaurant
Version: 1.0.0
Text Domain: dannys-sapori-child
*/

/* Keep parent theme styles and add the shop conversion layer. */
@import url("../dannys-restaurant/style.css");

:root {
    --sapori-green: #08783f;
    --sapori-green-dark: #075d32;
    --sapori-cream: #f7f5ef;
    --sapori-ink: #1b1d1b;
    --sapori-muted: #656b66;
    --sapori-border: #e5e7e2;
    --sapori-radius: 10px;
}

/* ------------------------------
   Shop hero
-------------------------------- */
.sapori-shop-hero {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    margin: 0 0 48px;
    display: flex;
    align-items: center;
    background: #172019;
    color: #fff;
    isolation: isolate;
}

.sapori-shop-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    transform: scale(1.01);
}

.sapori-shop-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(5, 15, 9, .86) 0%, rgba(5, 15, 9, .68) 45%, rgba(5, 15, 9, .20) 100%);
}

.sapori-shop-hero__inner {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 64px 0;
}

.sapori-shop-hero__eyebrow {
    display: inline-block;
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .9;
}

.sapori-shop-hero h1 {
    max-width: 720px;
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.04;
    font-weight: 700;
}

.sapori-shop-hero p {
    max-width: 610px;
    margin: 0 0 26px;
    color: rgba(255,255,255,.92);
    font-size: 18px;
    line-height: 1.55;
}

.sapori-shop-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sapori-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border: 2px solid transparent;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}

.sapori-btn:hover { transform: translateY(-1px); }
.sapori-btn--primary { background: var(--sapori-green); color: #fff !important; }
.sapori-btn--primary:hover { background: var(--sapori-green-dark); }
.sapori-btn--outline { background: transparent; border-color: rgba(255,255,255,.85); color: #fff !important; }
.sapori-btn--outline:hover { background: rgba(255,255,255,.10); }

/* ------------------------------
   Conversion sections
-------------------------------- */
.sapori-section {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto 54px;
}

.sapori-section--soft {
    width: 100%;
    padding: 48px max(20px, calc((100% - 1180px) / 2));
    background: var(--sapori-cream);
}

.sapori-section__heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.sapori-section__heading h2 {
    margin: 0;
    color: var(--sapori-ink);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
}

.sapori-section__heading p {
    margin: 6px 0 0;
    color: var(--sapori-muted);
}

.sapori-product-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.sapori-product-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--sapori-border);
    border-radius: var(--sapori-radius);
    box-shadow: 0 7px 22px rgba(18, 29, 22, .06);
}

.sapori-product-card__image {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f1f2ef;
}

.sapori-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.sapori-product-card:hover .sapori-product-card__image img { transform: scale(1.035); }

.sapori-product-card__body { padding: 16px; }
.sapori-product-card__title { margin: 0 0 7px; font-size: 17px; line-height: 1.25; }
.sapori-product-card__title a { color: var(--sapori-ink); text-decoration: none; }
.sapori-product-card__price { margin: 0 0 14px; font-weight: 700; color: var(--sapori-green-dark); }
.sapori-product-card__button { width: 100%; }

.sapori-upsell {
    display: grid;
    grid-template-columns: 1.1fr 2fr;
    gap: 30px;
    align-items: center;
}

.sapori-upsell__copy h2 { margin: 0 0 10px; font-size: 30px; }
.sapori-upsell__copy p { margin: 0; color: var(--sapori-muted); line-height: 1.6; }
.sapori-upsell__items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sapori-upsell__item { background: #fff; border: 1px solid var(--sapori-border); border-radius: 8px; padding: 12px; }
.sapori-upsell__item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 5px; margin-bottom: 8px; }
.sapori-upsell__item strong { display: block; font-size: 14px; }
.sapori-upsell__item span { color: var(--sapori-muted); font-size: 13px; }

.sapori-benefits {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 24px 0;
    border-top: 1px solid var(--sapori-border);
    border-bottom: 1px solid var(--sapori-border);
}
.sapori-benefit { text-align: center; padding: 8px 15px; }
.sapori-benefit__icon { font-size: 26px; line-height: 1; margin-bottom: 10px; }
.sapori-benefit strong { display: block; margin-bottom: 5px; color: var(--sapori-ink); }
.sapori-benefit span { color: var(--sapori-muted); font-size: 14px; }

.sapori-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.sapori-step { position: relative; text-align: center; }
.sapori-step__number { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; margin-bottom: 10px; border-radius: 50%; background: var(--sapori-green); color: #fff; font-weight: 700; }
.sapori-step h3 { margin: 0 0 6px; font-size: 17px; }
.sapori-step p { margin: 0; color: var(--sapori-muted); font-size: 14px; }

.sapori-gift {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 30px;
    align-items: center;
    padding: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #edf6ee, #f8faf4);
}
.sapori-gift h2 { margin: 0 0 10px; font-size: 32px; }
.sapori-gift p { margin: 0 0 20px; color: var(--sapori-muted); line-height: 1.6; }
.sapori-gift__value { justify-self: end; padding: 30px 38px; background: #fff; border-radius: 10px; box-shadow: 0 12px 30px rgba(20,50,30,.08); text-align: center; }
.sapori-gift__value strong { display: block; font-size: 24px; }

/* Native WooCommerce cards on the archive */
.woocommerce .products li.product {
    background: #fff;
    border: 1px solid var(--sapori-border);
    border-radius: var(--sapori-radius);
    overflow: hidden;
    box-shadow: 0 7px 22px rgba(18, 29, 22, .05);
    padding-bottom: 16px;
}
.woocommerce .products li.product > a.woocommerce-LoopProduct-link { margin: 0; }
.woocommerce .products li.product .woocommerce-loop-product__title { padding: 14px 16px 4px; margin: 0; font-size: 17px; color: var(--sapori-ink); }
.woocommerce .products li.product .price { padding: 0 16px; color: var(--sapori-green-dark); font-weight: 700; }
.woocommerce .products li.product .dn-btnAddToCart { padding: 0 16px; }
.woocommerce .products li.product .dn-btnAddToCart .button { width: 100%; border-radius: 4px; background: var(--sapori-green); color: #fff; border: 0; }
.woocommerce .products li.product .dn-btnAddToCart .button:hover { background: var(--sapori-green-dark); color: #fff; }
.woocommerce .products li.product .woocommerce-LoopProduct-link::after { display: none; }

/* Hide the old archive controls on the conversion shop; category archives retain them. */
.sapori-conversion-shop .woocommerce-result-count,
.sapori-conversion-shop .woocommerce-ordering { display: none; }
.sapori-conversion-shop .dn-pageTitle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 991px) {
    .sapori-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sapori-upsell { grid-template-columns: 1fr; }
    .sapori-gift { grid-template-columns: 1fr; }
    .sapori-gift__value { justify-self: start; }
    .sapori-benefits, .sapori-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    .sapori-shop-hero { min-height: 430px; margin-bottom: 32px; }
    .sapori-shop-hero__inner { width: min(100% - 30px, 1180px); padding: 44px 0; }
    .sapori-shop-hero p { font-size: 16px; }
    .sapori-section { width: min(100% - 30px, 1180px); margin-bottom: 36px; }
    .sapori-section--soft { padding: 34px 15px; }
    .sapori-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .sapori-product-card__body { padding: 12px; }
    .sapori-product-card__title { font-size: 15px; }
    .sapori-upsell__items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .sapori-upsell__item { padding: 8px; }
    .sapori-upsell__item strong { font-size: 12px; }
    .sapori-upsell__item span { font-size: 11px; }
    .sapori-benefits, .sapori-steps { grid-template-columns: 1fr 1fr; gap: 10px; }
    .sapori-gift { padding: 24px; }
    .sapori-shop-hero__actions { flex-direction: column; align-items: stretch; }
}
