/*
Theme Name: daddy base Media Block Theme
Theme URI: https://github.com/papa3-56/daddy-base-theme
Author: daddy base
Author URI: https://papa-hobby.net/
Description: Private block theme for daddy base, a warm affiliate media site for family life, work tools, comparison articles, and reviews.
Version: 0.2.1
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: daddy-base-theme
Update URI: false
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: full-site-editing, block-patterns, blog, one-column, custom-colors
*/

:root {
  --db-shadow-soft: 0 14px 32px rgba(91, 71, 50, 0.08);
  --db-shadow-card: 0 8px 20px rgba(91, 71, 50, 0.06);
  --db-shadow-button: 0 10px 22px rgba(23, 101, 106, 0.2);
  --db-surface-warm: #fffdf8;
  --db-surface-tint: #f3eee5;
  --db-text-readable: #1f2a30;
  --db-text-muted-readable: #4f5f5d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--db-text-readable);
  background: var(--wp--preset--color--base);
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--wp--preset--color--blue-green);
}

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

.wp-site-blocks {
  min-height: 100vh;
  color: var(--db-text-readable);
}

.wp-block-post-content,
.wp-block-post-content :where(p, li, td, th) {
  color: var(--db-text-readable);
}

.wp-block-post-content :where(a) {
  color: var(--wp--preset--color--blue-green);
  font-weight: 600;
}

.has-muted-color,
.has-muted-color :where(a) {
  color: var(--db-text-muted-readable) !important;
}

.db-site-header {
  border-bottom: 1px solid var(--wp--preset--color--border);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(12px);
}

.db-site-header > .wp-block-group {
  justify-content: flex-start;
  gap: clamp(2rem, 11vw, 8rem);
}

.db-site-header .wp-block-navigation {
  margin-left: clamp(1rem, 4vw, 3rem);
}

.db-site-footer {
  border-top: 1px solid var(--wp--preset--color--border);
  background: var(--wp--preset--color--surface);
}

.db-soft-card,
.db-category-card,
.db-review-card,
.db-cta-box,
.db-disclosure,
.db-compare-card,
.db-pattern-card,
.db-article-shell {
  box-shadow: var(--db-shadow-card);
}

.db-soft-card:hover,
.db-category-card:hover {
  transform: translateY(-2px);
}

.db-soft-card,
.db-category-card {
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.db-hero {
  background: url("./assets/images/top-fv-bg.webp") center / cover no-repeat;
  box-shadow: var(--db-shadow-soft);
}

.db-hero h1,
.db-hero > p {
  text-shadow: 0 1px 8px rgba(255, 253, 248, 0.72);
}

.db-pr-label {
  display: inline-flex;
  width: fit-content;
  border-radius: 10px;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--wp--preset--color--border);
  background: var(--db-surface-tint);
  color: var(--db-text-muted-readable);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 700;
}

.db-article-shell {
  border-radius: 16px;
}

.db-post-meta {
  align-items: center;
}

.db-article-content > * + * {
  margin-block-start: var(--wp--preset--spacing--50);
}

.db-post-footer-nav {
  border-radius: 14px;
  padding: var(--wp--preset--spacing--50);
  background: var(--db-surface-warm);
  border: 1px solid var(--wp--preset--color--border);
}

.db-pattern-card {
  margin-block: var(--wp--preset--spacing--60);
}

.db-note-box,
.db-ranking-item {
  border: 1px solid var(--wp--preset--color--border);
}

.db-ranking-item {
  border-radius: 12px;
  background: var(--db-surface-warm);
}

.db-check-list {
  padding-inline-start: 1.2rem;
}

.db-check-list li::marker {
  color: var(--wp--preset--color--blue-green);
}

.db-info-table th {
  width: 32%;
  color: var(--wp--preset--color--soft-navy);
  background: var(--wp--preset--color--cream);
}

.db-post-list li {
  padding: 1.25rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 12px;
  background: var(--db-surface-warm);
  box-shadow: var(--db-shadow-card);
}

.db-post-list .wp-block-post-featured-image {
  overflow: hidden;
  margin-block: 0 var(--wp--preset--spacing--30);
  border-radius: 10px;
  background: var(--wp--preset--color--soft-gray);
}

.db-post-list .wp-block-post-featured-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.db-post-list a {
  text-decoration: none;
}

.wp-block-post-title a {
  text-decoration: none;
}

.db-page-shell .wp-block-post-title {
  text-align: center;
}

.db-page-content {
  max-width: 720px;
  margin-inline: auto;
  text-align: left;
}

.db-page-content > * {
  margin-left: auto;
  margin-right: auto;
}

.db-page-content .wpcf7 {
  max-width: 720px;
}

#home-search.db-soft-card {
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none;
}

#home-search .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 12px;
  padding: 0.45rem;
  padding-left: 2.65rem;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(91, 71, 50, 0.08);
}

#home-search .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper::before {
  position: absolute;
  top: 50%;
  left: 1rem;
  width: 1.05rem;
  height: 1.05rem;
  background: var(--db-text-muted-readable);
  content: "";
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: translateY(-50%);
}

.wp-block-search__input::placeholder {
  color: var(--db-text-muted-readable);
  opacity: 0.84;
}

#themes.db-soft-card,
#latest-posts.db-soft-card,
#featured-products.db-soft-card,
.db-feature-strip.db-soft-card {
  border-color: var(--wp--preset--color--border);
}

#themes.db-soft-card,
#latest-posts.db-soft-card,
#featured-products.db-soft-card {
  background-color: #fbf8f2;
}

.db-feature-strip.db-soft-card {
  background-color: var(--wp--preset--color--soft-gray);
}

#themes .wp-block-column > p,
#latest-posts .wp-block-column > .wp-block-group,
#featured-products .wp-block-column > .wp-block-group {
  background-color: var(--db-surface-warm);
  border-color: var(--wp--preset--color--border);
  box-shadow: 0 6px 16px rgba(91, 71, 50, 0.05);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background-color 160ms ease;
}

#themes .wp-block-column > p:hover,
#latest-posts .wp-block-column > .wp-block-group:hover,
#featured-products .wp-block-column > .wp-block-group:hover {
  border-color: rgba(209, 138, 74, 0.55);
  background-color: var(--db-surface-warm);
  box-shadow: 0 10px 22px rgba(91, 71, 50, 0.08);
}

.db-empty-message {
  max-width: 42rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 12px;
  padding: var(--wp--preset--spacing--40);
  background: var(--db-surface-warm);
}

.db-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--wp--preset--spacing--30);
}

.db-product-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 12px;
  padding: var(--wp--preset--spacing--30);
  background: var(--db-surface-warm);
  box-shadow: 0 6px 16px rgba(91, 71, 50, 0.05);
}

.db-product-card--article {
  max-width: 42rem;
  margin-inline: auto;
}

.db-product-note {
  margin-block: 0;
  color: var(--db-text-readable);
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.7;
}

.db-product-media {
  overflow: hidden;
  border-radius: 10px;
  background: var(--wp--preset--color--soft-gray);
  aspect-ratio: 4 / 3;
}

.db-product-media img,
.db-product-placeholder {
  display: block;
  width: 100%;
  height: 100%;
}

.db-product-media img {
  object-fit: cover;
}

.db-product-placeholder {
  background:
    linear-gradient(135deg, rgba(23, 101, 106, 0.08), rgba(215, 154, 91, 0.1)),
    var(--wp--preset--color--soft-gray);
}

.db-product-label {
  width: fit-content;
  margin: 0;
  border-radius: 8px;
  padding: 0.2rem 0.55rem;
  background: var(--wp--preset--color--blue-green);
  color: var(--wp--preset--color--surface);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 700;
  line-height: 1.3;
}

.db-product-title {
  margin-block: 0;
  color: var(--wp--preset--color--soft-navy);
  font-size: var(--wp--preset--font-size--medium);
  line-height: 1.45;
}

.db-product-description {
  margin-block: 0;
  color: var(--db-text-muted-readable);
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.65;
}

.db-product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.db-product-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  border: 1px solid rgba(23, 101, 106, 0.35);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  background: #ffffff;
  color: var(--wp--preset--color--blue-green);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.db-product-link:hover,
.db-product-link:focus {
  transform: translateY(-1px);
  background: var(--wp--preset--color--blue-green);
  color: var(--wp--preset--color--surface);
  box-shadow: 0 8px 18px rgba(23, 101, 106, 0.18);
}

#themes .wp-block-columns a {
  color: var(--wp--preset--color--soft-navy);
  font-weight: 700;
  text-decoration: none;
}

#themes .wp-block-columns a:hover,
#themes .wp-block-columns a:focus {
  color: var(--wp--preset--color--blue-green);
}

.db-feature-strip .wp-block-column {
  border-inline-end: 1px solid var(--wp--preset--color--border);
  padding-inline-end: var(--wp--preset--spacing--30);
}

.db-feature-strip .wp-block-column:last-child {
  border-inline-end: 0;
  padding-inline-end: 0;
}

.wp-block-navigation a {
  text-decoration: none;
}

.wp-block-button__link {
  border-radius: 10px;
  box-shadow: var(--db-shadow-button);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
}

.db-hero .wp-block-buttons {
  align-items: center;
}

.db-hero .wp-block-button {
  min-width: min(100%, 260px);
}

.db-hero .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border-radius: 10px;
  padding: 0.75rem 1.1rem;
  gap: 0.55rem;
}

.db-hero .wp-block-button__link::before {
  display: inline-block;
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  background: currentColor;
  content: "";
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.db-hero .wp-block-button__link[href="#home-search"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
}

.db-hero .wp-block-button__link[href="#themes"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}

.db-hero .db-hero-theme-button .wp-block-button__link,
.db-hero .db-hero-theme-button .wp-block-button__link::before {
  color: #17656a;
}

.wp-block-button__link:hover,
.wp-block-button__link:focus {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(23, 101, 106, 0.26);
}

.wp-block-button__link:not(.has-surface-background-color):hover,
.wp-block-button__link:not(.has-surface-background-color):focus {
  color: var(--wp--preset--color--surface);
}

.wp-block-button__link.has-blue-green-background-color,
.wp-block-button__link.has-soft-navy-background-color {
  box-shadow: 0 10px 22px rgba(37, 123, 122, 0.2);
}

.wp-block-button__link.has-blue-green-background-color:hover,
.wp-block-button__link.has-blue-green-background-color:focus,
.wp-block-button__link.has-soft-navy-background-color:hover,
.wp-block-button__link.has-soft-navy-background-color:focus {
  box-shadow: 0 12px 26px rgba(37, 123, 122, 0.26);
}

.wp-block-button__link.has-surface-background-color.has-blue-green-color,
.wp-block-button__link.has-surface-background-color.has-soft-navy-color {
  box-shadow: 0 8px 18px rgba(23, 101, 106, 0.12);
}

.wp-block-button__link.has-surface-background-color.has-blue-green-color:hover,
.wp-block-button__link.has-surface-background-color.has-soft-navy-color:hover,
.wp-block-button__link.has-surface-background-color.has-blue-green-color:focus,
.wp-block-button__link.has-surface-background-color.has-soft-navy-color:focus {
  background: var(--wp--preset--color--blue-green);
  border-color: var(--wp--preset--color--blue-green);
  color: var(--wp--preset--color--surface);
  box-shadow: 0 10px 22px rgba(23, 101, 106, 0.2);
}

.db-hero .db-hero-theme-button .wp-block-button__link:hover,
.db-hero .db-hero-theme-button .wp-block-button__link:focus {
  background: var(--wp--preset--color--surface);
  border-color: #17656a;
  color: #17656a;
}

.wp-block-table table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.wp-block-table th,
.wp-block-table td {
  border-color: var(--wp--preset--color--border);
  padding: 0.9rem;
}

.wp-block-search__input {
  min-height: 48px;
  border: 0;
  padding: 0.7rem 0.9rem;
  background: #ffffff;
}

.wp-block-search__input:focus {
  outline: 2px solid rgba(23, 101, 106, 0.28);
  outline-offset: 2px;
}

.wp-block-search__button {
  min-height: 44px;
  border-radius: 10px;
  box-shadow: none;
}

.wp-block-post-excerpt__more-link {
  color: var(--wp--preset--color--blue-green);
  font-weight: 700;
}

.wp-block-post-featured-image img {
  border-radius: 12px;
}

.wp-block-image figcaption,
.wp-block-table figcaption {
  color: var(--db-text-muted-readable);
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.6;
}

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

@media (max-width: 720px) {
  .db-site-header > .wp-block-group {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .db-site-header .wp-block-site-logo img {
    width: min(220px, 58vw) !important;
  }

  .db-site-header .wp-block-navigation {
    margin-left: 0;
    flex: 0 0 auto;
  }

  .db-site-header .wp-block-navigation__responsive-container-open {
    margin-left: auto;
  }

  .db-feature-strip .wp-block-column {
    border-inline-end: 0;
    border-bottom: 1px solid var(--wp--preset--color--border);
    padding-inline-end: 0;
    padding-bottom: var(--wp--preset--spacing--30);
  }

  .db-feature-strip .wp-block-column:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
}

@media (max-width: 640px) {
  .db-product-grid {
    grid-template-columns: 1fr;
  }
}
