/* WP base + Layered (rosa soft) */

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body.theme-clean-b {
  margin: 0;
  overflow-x: hidden;
  --tone-bar-h: 0px;
  --glass-header-top: 0.85rem;
  /* Rosa soft — scelta cliente (bozza tone bar) */
  --rose: #f472b6;
  --rose-deep: #be185d;
  --rose-soft: #fbcfe8;
  --glass-blur: 22px;
  --glass-sat: 1.45;
  padding-top: 0;
  min-height: 100vh;
}

body.theme-clean-b a {
  color: inherit;
}

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

/* Hero ken-burns must not create horizontal scroll */
.glass-hero {
  overflow: hidden;
}

/* Logo come bozza: "Dolci idee" lowercase Sora bold */
.glass-logo {
  text-decoration: none;
  white-space: nowrap;
}

.glass-logo .logo-mark {
  display: inline-block;
  font-family: var(--font-clean-display), 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: lowercase;
  color: var(--rose);
}

.glass-header.is-over-hero:not(.is-solid) .glass-logo .logo-mark {
  color: #fff !important;
}

@media (min-width: 900px) {
  .glass-logo .logo-mark {
    font-size: 1.4rem;
  }
}

.footer-logo-original {
  width: 112px;
  height: 112px;
  object-fit: contain;
  display: block;
}

/* Popup */
.dolci-popup {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(22, 16, 21, 0.45);
  backdrop-filter: blur(6px);
}

.dolci-popup[hidden] {
  display: none !important;
}

.dolci-popup__panel {
  width: min(440px, 100%);
  border-radius: 1.5rem;
  padding: 1.5rem 1.6rem 1.75rem;
  position: relative;
}

.dolci-popup__close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  opacity: 0.6;
}

.dolci-popup__close:hover {
  opacity: 1;
}

.dolci-popup__body {
  padding-right: 1.25rem;
}

.dolci-popup__body > *:first-child {
  margin-top: 0;
}

/* ——— Shop / PDP (bozza-aligned) ——— */
.dolci-woo .woocommerce-products-header,
.dolci-woo .shop-hero {
  margin-bottom: 0.5rem;
}

.dolci-woo .shop-hero h1,
.dolci-woo .woocommerce-products-header__title,
.dolci-woo h1.product_title,
.pdp h1 {
  font-family: var(--font-clean-display);
  letter-spacing: -0.03em;
}

.dolci-woo .shop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 1.75rem;
}

.dolci-woo .shop-filters a {
  text-decoration: none;
  color: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.7);
}

.dolci-woo .shop-filters a.is-active {
  background: var(--rose);
  border-color: var(--rose);
  color: #fff;
}

/* Kill default Woo float grid — use shop-grid */
.dolci-woo ul.products,
.dolci-woo ul.products.columns-3,
.dolci-woo ul.products.columns-4 {
  display: grid !important;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0 !important;
  padding: 0;
  width: 100% !important;
}

@media (min-width: 900px) {
  .dolci-woo ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

.dolci-woo ul.products::before,
.dolci-woo ul.products::after {
  display: none !important;
  content: none !important;
}

.dolci-woo ul.products li.product {
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  float: none !important;
  clear: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  list-style: none;
}

.dolci-woo ul.products li.product::before,
.dolci-woo ul.products li.product::after {
  display: none !important;
  content: none !important;
}

/* Single glass frame lives on .shop-card (layered.css) */
.dolci-woo ul.products li.product a.shop-card {
  padding: 0.75rem;
  height: 100%;
}

.dolci-woo ul.products li.product a img,
.dolci-woo ul.products li.product .shop-card__media img,
.dolci-woo ul.products li.product .attachment-woocommerce_thumbnail {
  border-radius: 1.1rem;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f3e6ec;
  margin: 0;
}

.dolci-woo ul.products li.product .woocommerce-loop-product__title,
.dolci-woo ul.products li.product .shop-card__title {
  font-family: var(--font-clean-display);
  font-size: 0.98rem;
  line-height: 1.3;
  padding: 0 0.15rem;
  margin: 0;
  font-weight: 600;
}

.dolci-woo ul.products li.product .price,
.dolci-woo ul.products li.product .shop-card__price {
  color: var(--rose-deep);
  padding: 0 0.15rem 0.15rem;
  font-weight: 700;
  margin: 0;
}

.dolci-woo ul.products li.product .button,
.dolci-woo ul.products li.product .added_to_cart {
  display: none !important; /* card = link like bozza */
}

.dolci-woo .woocommerce-result-count,
.dolci-woo .woocommerce-ordering {
  margin-bottom: 1rem;
  opacity: 0.75;
  font-size: 0.9rem;
}

.dolci-woo .woocommerce-ordering select {
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.75);
}

/* Home shop-card images inside <a> */
.shop-card__media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 1.1rem;
  background: #f3e6ec;
}

.shop-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* PDP */
.pdp {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .pdp {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: start;
  }
}

.pdp-gallery {
  display: grid;
  gap: 0.75rem;
}

.pdp-gallery__main {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 1.35rem;
  background: #f3e6ec;
}

.pdp-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-badge {
  display: inline-flex;
  width: fit-content;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: #ffe566;
  color: #111;
}

.pdp h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  line-height: 1.1;
}

.pdp .price {
  margin: 1rem 0 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--rose-deep);
}

.pdp-excerpt {
  margin: 1rem 0 0;
  line-height: 1.55;
  opacity: 0.8;
}

.pdp .cart {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.pdp .quantity input.qty {
  border: 1px solid rgba(22, 16, 21, 0.12);
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  width: 4.5rem;
  font: inherit;
}

.pdp .single_add_to_cart_button,
.dolci-woo .single_add_to_cart_button,
.dolci-woo .checkout-button,
.dolci-woo button.button.alt,
.dolci-woo a.checkout-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 0.85rem 1.35rem !important;
  background: var(--rose) !important;
  color: #fff !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 10px 28px color-mix(in srgb, var(--rose) 32%, transparent);
}

.pdp-long {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
}

.pdp-related {
  margin-top: 3.5rem;
}

.pdp-related h2 {
  font-family: var(--font-clean-display);
  font-size: 1.5rem;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}

.pdp .variations {
  margin-top: 1.25rem;
  width: 100%;
}

.pdp .variations td,
.pdp .variations th {
  padding: 0.4rem 0;
  border: 0;
  vertical-align: middle;
}

.pdp .variations select {
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.75);
  font: inherit;
}

.pdp .woocommerce-product-gallery {
  margin: 0 !important;
}

.pdp .woocommerce-product-gallery__wrapper {
  margin: 0;
}

.pdp .flex-control-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem !important;
  padding: 0;
  list-style: none;
}

.pdp .flex-control-thumbs li {
  width: 72px;
  float: none !important;
}

.pdp .flex-control-thumbs img {
  border-radius: 0.75rem;
  border: 2px solid transparent;
}

.pdp .flex-control-thumbs .flex-active {
  border-color: var(--rose);
}

.site-content {
  min-height: 40vh;
}

/* Woo notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-radius: 1rem;
  border: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
}

.pdp-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pdp-thumbs button {
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  background: #eee;
}

.pdp-thumbs button.is-active {
  border-color: var(--rose);
}

.pdp-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  padding-inline: 0.15rem;
}

.shop-card__type {
  font-size: 0.75rem;
  opacity: 0.65;
}

.shop-card__badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  background: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  z-index: 2;
}

.dolci-woo ul.products li.product a.shop-card,
a.shop-card {
  display: grid;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

/* Home panels: breathing room between stacked glass sections */
.theme-clean-b .glass-section.glass-section--panel {
  margin-top: 1.75rem;
  margin-bottom: 1.75rem;
}

.theme-clean-b .glass-section.glass-section--panel + .glass-section.glass-section--panel {
  margin-top: 2.25rem;
}

.theme-clean-b .glass-products,
.theme-clean-b .glass-mix {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

/* Category cards with images */
.home-cat {
  display: grid !important;
  grid-template-rows: auto 1fr;
  gap: 0.85rem;
  padding: 0.75rem !important;
  text-decoration: none;
}

.home-cat__media {
  aspect-ratio: 16 / 10;
  border-radius: 1rem;
  overflow: hidden;
  background: #f3e6ec;
}

.home-cat__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.home-cat:hover .home-cat__media img {
  transform: scale(1.04);
}

.home-cat__body {
  display: grid;
  gap: 0.35rem;
  padding: 0.15rem 0.35rem 0.5rem;
}

/* Store section with background image */
.glass-store {
  position: relative;
  isolation: isolate;
}

.glass-store__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.glass-store > *:not(.glass-store__bg) {
  position: relative;
  z-index: 1;
}

.glass-store::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, rgba(26, 18, 22, 0.88), rgba(58, 24, 40, 0.75));
}

.shop-grid .shop-card {
  padding: 0.75rem;
}
