/*
Theme Name: Warm Sunday Home
Theme URI: https://warmsundayhome.com/
Description: A warm Storefront child theme for Warm Sunday Home.
Author: Warm Sunday Home
Template: storefront
Version: 1.0.0
*/

:root {
  --cozy-cream: #f7f1e8;
  --cozy-paper: #fbf7f1;
  --cozy-card: #fffdf9;
  --cozy-blush: #e8c4b8;
  --cozy-terracotta: #c46a4a;
  --cozy-terracotta-dark: #a5553b;
  --cozy-sage: #7a8f73;
  --cozy-sage-soft: #e7eee4;
  --cozy-brown: #3a2a22;
  --cozy-ink: #3a2a22;
  --cozy-muted: #7a6a5e;
  --cozy-line: rgba(58, 42, 34, 0.1);
  --cozy-shadow: 0 10px 28px rgba(58, 42, 34, 0.08);
  --cozy-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --cozy-font-body: "Nunito", "Segoe UI", sans-serif;
}

html { background: var(--cozy-cream); }

body,
button,
input,
textarea,
select,
.button,
.woocommerce-loop-product__title,
.site-header-cart {
  font-family: var(--cozy-font-body) !important;
}

body {
  background-color: var(--cozy-cream) !important;
  color: var(--cozy-ink);
  font-size: 17px;
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6,
.site-title,
.entry-title,
.woocommerce-loop-product__title,
.widget-title,
.storefront-product-section h2 {
  font-family: var(--cozy-font-display) !important;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--cozy-brown);
}

/* ----- Header ----- */
.site-header,
.storefront-primary-navigation,
.storefront-secondary-navigation {
  background: var(--cozy-cream) !important;
}

.site-header {
  border-bottom: 1px solid var(--cozy-line);
  padding-top: 0.85em;
  padding-bottom: 0.6em;
}

.site-branding { margin-bottom: 0.4em; }

.site-title {
  font-size: 1.85rem;
  margin: 0;
  font-weight: 600;
}
.site-title a,
.site-title a:hover,
.site-title a:focus {
  color: var(--cozy-brown) !important;
  text-decoration: none;
}

.site-description {
  font-family: var(--cozy-font-body) !important;
  font-style: normal !important;
  color: var(--cozy-muted) !important;
  font-size: 0.92rem;
  margin-top: 2px;
}

.main-navigation ul li a,
.site-header-cart .cart-contents {
  color: var(--cozy-brown) !important;
  font-weight: 600;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
  color: var(--cozy-terracotta) !important;
}

.storefront-primary-navigation { border-top: 0; }

.site-search .widget_product_search form input[type="search"],
.site-search .widget_product_search form input[type="text"] {
  background: var(--cozy-paper);
  border: 1px solid var(--cozy-line);
  border-radius: 999px;
  padding-left: 1.1em;
}

/* ----- Hide leftover blog chrome on the store ----- */
.cozy-nosidebar .widget-area { display: none !important; }
.cozy-nosidebar .content-area,
.storefront-full-width-content .content-area,
.page-template-template-homepage-php .content-area {
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
}

.home.page .page-header,
.home.page .entry-header,
.home.page h1.entry-title,
.page-template-template-homepage-php .entry-header {
  display: none !important;
}

/* Homepage content is built by the theme; don't leave a white empty box. */
.page-template-template-homepage-php .type-page {
  background: transparent;
  padding: 0;
  margin: 0;
  box-shadow: none;
  border: 0;
}

#content.site-content { padding-top: 0; padding-bottom: 0; background: transparent; }
.home #content .col-full { padding: 0; max-width: none; }

/* ----- Hero ----- */
.cozy-hero {
  position: relative;
  min-height: 560px;
  background-color: var(--cozy-brown);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  margin: 0;
}
.cozy-hero-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 28px;
}
.cozy-hero-card {
  background: rgba(251, 247, 241, 0.95);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  padding: 36px 40px 40px;
  max-width: 540px;
  box-shadow: 0 18px 44px rgba(58, 42, 34, 0.2);
}
.cozy-eyebrow {
  margin: 0 0 10px;
  font-family: var(--cozy-font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cozy-terracotta);
}
.cozy-hero-card h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.05rem);
  line-height: 1.15;
  color: var(--cozy-brown);
}
.cozy-hero-card .lede {
  margin: 0 0 24px;
  font-size: 1.08rem;
  color: var(--cozy-muted);
}

/* ----- Buttons ----- */
.cozy-btn,
button.button,
input[type="submit"],
.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce #respond input#submit,
.added_to_cart {
  background: var(--cozy-terracotta) !important;
  border: 0 !important;
  color: #fff9f5 !important;
  border-radius: 999px !important;
  font-family: var(--cozy-font-body) !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  padding: 0.75em 1.5em !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
.cozy-btn:hover,
button.button:hover,
.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.added_to_cart:hover {
  background: var(--cozy-terracotta-dark) !important;
  color: #fff9f5 !important;
}
.cozy-btn {
  display: inline-block;
  text-decoration: none !important;
  font-size: 1rem;
}

/* ----- Shared sections ----- */
.cozy-section {
  padding: 64px 0;
}
.cozy-section .col-full,
.cozy-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}
.cozy-section h2 {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  margin: 0 0 10px;
  text-align: center;
}
.cozy-sub {
  text-align: center;
  color: var(--cozy-muted);
  margin: 0 auto 36px;
  max-width: 640px;
  font-size: 1.05rem;
}

/* About */
.cozy-about {
  background: var(--cozy-paper);
}
.cozy-about-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 0 28px;
}
.cozy-about p { margin: 0 0 1em; color: var(--cozy-ink); }
.cozy-about p:last-child { margin-bottom: 0; }

/* Vibe tiles */
.cozy-tiles {
  background: var(--cozy-cream);
}
.cozy-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.cozy-tile {
  position: relative;
  display: block;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 1 / 1.05;
  text-decoration: none;
  color: #fff;
  box-shadow: var(--cozy-shadow);
}
.cozy-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.cozy-tile:hover img { transform: scale(1.04); }
.cozy-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(58, 42, 34, 0.72) 0%, rgba(58, 42, 34, 0.05) 55%);
}
.cozy-tile-copy {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 22px 20px;
}
.cozy-tile-copy strong {
  display: block;
  font-family: var(--cozy-font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.cozy-tile-copy span {
  display: block;
  font-size: 0.95rem;
  opacity: 0.92;
  margin-top: 2px;
}

/* Product cards */
.cozy-picks { background: var(--cozy-paper); }
ul.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0 !important;
}
ul.products::before,
ul.products::after { display: none !important; content: none !important; }
ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  background: var(--cozy-card);
  border-radius: 20px;
  box-shadow: var(--cozy-shadow);
  overflow: hidden;
  padding: 0 0 1.4em !important;
  text-align: center;
  border: 1px solid rgba(58, 42, 34, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
ul.products li.product:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(58, 42, 34, 0.12);
}
ul.products li.product a img,
ul.products li.product img {
  width: 100% !important;
  height: auto;
  margin: 0 !important;
  border-radius: 0;
  background: #fff;
}
ul.products li.product .woocommerce-loop-product__title {
  font-size: 1.08rem !important;
  padding: 0.85em 1em 0.15em;
  margin: 0;
}
ul.products li.product .price {
  color: var(--cozy-terracotta) !important;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0 1em;
}
ul.products li.product .button,
ul.products li.product .added_to_cart {
  margin: 0.85em auto 0 !important;
  display: inline-block;
  float: none !important;
}

/* Why shop */
.cozy-why {
  background: #f3e6dc;
}
.cozy-why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.cozy-why-item {
  text-align: center;
  padding: 8px 12px;
}
.cozy-why-item svg {
  width: 36px;
  height: 36px;
  margin: 0 auto 12px;
  display: block;
  stroke: var(--cozy-terracotta);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cozy-why-item h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}
.cozy-why-item p {
  margin: 0;
  color: var(--cozy-muted);
  font-size: 0.98rem;
}

/* Soft note */
.cozy-note {
  background: var(--cozy-cream);
  padding: 28px 0 56px;
  text-align: center;
  color: var(--cozy-muted);
  font-size: 0.98rem;
}
.cozy-note a { color: var(--cozy-terracotta); }

/* ----- Shop / archives ----- */
.woocommerce-products-header .woocommerce-products-header__title,
.woocommerce-products-header h1 {
  font-size: 2.2rem;
}
.woocommerce-result-count,
.woocommerce-ordering select {
  color: var(--cozy-muted);
}
.storefront-sorting { margin: 0 0 1.5em; }

.site-main, .content-area { background: transparent; }
.right-sidebar .content-area { width: 100%; }

/* ----- Product page ----- */
.single-product div.product .woocommerce-product-gallery {
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--cozy-shadow);
}
.single-product div.product .product_title {
  font-size: 2.1rem;
  line-height: 1.2;
}
.single-product div.product p.price,
.single-product div.product span.price {
  color: var(--cozy-terracotta) !important;
  font-size: 1.5rem;
  font-weight: 700;
}
.cozy-ship-notice {
  padding: 0.75em 1em !important;
  background: #f3e6dc !important;
  border-left: 4px solid var(--cozy-terracotta) !important;
  border-radius: 0 12px 12px 0;
  font-size: 0.95em;
}
.woocommerce-Tabs-panel,
.woocommerce-tabs ul.tabs {
  background: var(--cozy-paper);
}
.woocommerce-tabs ul.tabs li,
.woocommerce-tabs ul.tabs li a {
  background: var(--cozy-paper);
  border-radius: 12px 12px 0 0;
}
.woocommerce-tabs ul.tabs li.active a { color: var(--cozy-terracotta); }
.quantity .qty {
  border-radius: 999px;
  border: 1px solid var(--cozy-line);
  background: #fff;
}

/* Related products already use ul.products */

/* ----- Inner pages (about, contact, shipping) ----- */
.page:not(.home) .entry-content,
.page:not(.home) .hentry {
  background: var(--cozy-card);
  border-radius: 20px;
  box-shadow: var(--cozy-shadow);
  padding: 2em 2em 2.2em;
}
.page:not(.home) .entry-title { margin-bottom: 0.6em; }

/* ----- Footer ----- */
.cozy-newsletter {
  background: #4a372c;
  color: #f3e6dc;
  text-align: center;
  padding: 36px 28px 20px;
}
.cozy-newsletter h2 {
  color: #f7f1e8 !important;
  margin: 0 0 8px;
  font-size: 1.6rem;
}
.cozy-newsletter p {
  margin: 0 auto;
  max-width: 560px;
  color: #e8d9c8;
}

.site-footer {
  background: var(--cozy-brown) !important;
  color: #e8d9c8 !important;
  padding-top: 1.5em;
}
.site-footer a { color: #f3e6dc !important; }
.site-footer h1, .site-footer h2, .site-footer h3,
.site-footer .widget .widget-title {
  color: #f7f1e8 !important;
}
.site-info {
  border-top: 1px solid rgba(247, 241, 232, 0.12);
  color: #cbb9a8;
}
.site-info a { color: #e8d9c8 !important; }

/* Handheld footer bar */
.storefront-handheld-footer-bar,
.storefront-handheld-footer-bar ul li > a {
  background: var(--cozy-brown);
  color: #f7f1e8;
}

/* Cart / checkout warmth */
.woocommerce-cart .cart-collaterals,
.woocommerce-checkout .woocommerce {
  background: transparent;
}

/* ----- Mobile ----- */
@media (max-width: 768px) {
  .site-title { font-size: 1.5rem; }
  .cozy-hero { min-height: 0; align-items: flex-end; }
  .cozy-hero-inner { padding: 0; }
  .cozy-hero-card {
    max-width: none;
    width: 100%;
    border-radius: 24px 24px 0 0;
    padding: 28px 22px 32px;
    box-shadow: 0 -8px 28px rgba(58, 42, 34, 0.18);
  }
  .cozy-hero {
    /* keep a generous photo area above the card */
    padding-top: 210px;
  }
  .cozy-section { padding: 44px 0; }
  .cozy-section .col-full, .cozy-wrap, .cozy-about-inner { padding: 0 18px; }
  .cozy-tile-grid,
  .cozy-why-grid,
  ul.products {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  ul.products li.product { width: auto !important; }
  /* two-up tiles on slightly larger phones if space — 390 is 1 col, that's ok */
  .page:not(.home) .hentry { padding: 1.25em; }
}

@media (min-width: 520px) and (max-width: 768px) {
  .cozy-tile-grid { grid-template-columns: 1fr; }
  ul.products { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 769px) and (max-width: 900px) {
  ul.products { grid-template-columns: repeat(2, 1fr); }
  .cozy-tile-grid, .cozy-why-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Gallery: radius the main photo only so thumbnails aren't clipped. */
.single-product div.product .woocommerce-product-gallery {
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
.single-product div.product .flex-viewport,
.single-product div.product .woocommerce-product-gallery__wrapper {
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--cozy-shadow);
}
.single-product div.product ol.flex-control-nav,
.single-product div.product .flex-control-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0 !important;
  padding: 0;
  overflow: visible;
}
.single-product div.product .flex-control-thumbs li {
  width: 72px !important;
  float: none !important;
  margin: 0 !important;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

/* Product tabs: keep a horizontal row on desktop, not a stacked accordion. */
@media (min-width: 769px) {
  .woocommerce-tabs ul.tabs {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    list-style: none;
  }
  .woocommerce-tabs ul.tabs li {
    background: #efe6d9 !important;
    border: 0 !important;
    border-radius: 12px 12px 0 0 !important;
    padding: 0 !important;
    margin: 0 6px 0 0 !important;
  }
  .woocommerce-tabs ul.tabs li a {
    background: transparent !important;
    padding: 0.7em 1.15em !important;
    display: block;
  }
  .woocommerce-tabs ul.tabs li.active {
    background: var(--cozy-paper) !important;
  }
  .woocommerce-tabs .woocommerce-Tabs-panel,
  .woocommerce-tabs .panel {
    background: var(--cozy-paper);
    border-radius: 0 16px 16px 16px;
    padding: 1.4em 1.6em;
    margin: 0 0 2em;
  }
}

.related.products ul.products,
.upsells.products ul.products {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  overflow: hidden;
}
body, .site { overflow-x: hidden; }

.woocommerce-products-header { margin: 0.3em 0 0.8em; padding: 0; }
.woocommerce-products-header .woocommerce-products-header__title { margin: 0; }

@media (max-width: 768px) {
  .site-header { padding-top: 0.45em; padding-bottom: 0.35em; }
  .site-branding { margin-bottom: 0; }
  .site-title { font-size: 1.35rem !important; white-space: nowrap; }
  .site-description { display: none; }
  .cozy-hero {
    min-height: 560px;
    padding-top: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-position: 18% center;
  }
  .site-footer { padding-bottom: 4.5em; }
}

/* Constrain the gallery track so extra slides don't spill across the page. */
.single-product div.product .woocommerce-product-gallery {
  max-width: 100%;
  overflow: visible;
}
.single-product div.product .flex-viewport,
.single-product div.product .woocommerce-product-gallery__wrapper {
  max-width: 100% !important;
  width: 100% !important;
  overflow: hidden !important;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--cozy-shadow);
}
.single-product div.product .flex-control-thumbs li img {
  width: 100% !important;
  height: 72px !important;
  object-fit: cover !important;
  display: block;
}

/* Next/prev product peek on the page edge looks like a broken leftover image. */
.storefront-product-pagination { display: none !important; }

/* Force product tabs into a horizontal row on desktop. */
@media (min-width: 769px) {
  .woocommerce-tabs {
    display: block !important;
  }
  .woocommerce-tabs ul.tabs {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    width: 100% !important;
    float: none !important;
    max-width: none !important;
  }
  .woocommerce-tabs ul.tabs li a::after,
  .woocommerce-tabs ul.tabs li a::before {
    display: none !important;
    content: none !important;
  }
  .woocommerce-tabs .woocommerce-Tabs-panel,
  .woocommerce-tabs .panel {
    width: 100% !important;
    float: none !important;
    clear: both;
  }
}

/* One sorting bar is enough. */
ul.products + .storefront-sorting { display: none; }

/* Storefront puts a Genericons chevron on each tab label (::after on the <li>). */
.woocommerce-tabs ul.tabs li::after,
.woocommerce-tabs ul.tabs li::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
