/*
Theme Name:       OpenPuzzle Storefront
Theme URI:        https://openpuzzle.ai
Description:      Marketplace-style storefront theme inspired by OpenPuzzle.ai: hero search, tag chips, solution cards, trending sidebar, how-it-works section. Built for the WooCommerce vibe-platform store.
Version:         1.0.0
Author:          vibe-platform
License:         GPL-2.0-or-later
License URI:     https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:     openpuzzle
Requires at least: 6.0
Tested up to:    7.1
Requires PHP:    8.1
Tags:            e-commerce, custom-colors, custom-logo, featured-images
*/

/* ==========================================================================
   Design tokens (mirrors the Tailwind slate/indigo/violet palette of the
   reference site so cards, hero and buttons match 1:1)
   ========================================================================== */
:root {
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --indigo-50:  #eef2ff;
  --indigo-100: #e0e7ff;
  --indigo-300: #a5b4fc;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;

  --violet-600: #7c3aed;

  --grad-brand: linear-gradient(135deg, var(--indigo-500), var(--violet-600));
  --grad-text:  linear-gradient(90deg, var(--indigo-600), var(--violet-600));

  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-3xl: 1.875rem;

  --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(15 23 42 / 0.07), 0 2px 4px -2px rgb(15 23 42 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(15 23 42 / 0.08), 0 4px 6px -4px rgb(15 23 42 / 0.08);
  --shadow-xl: 0 20px 25px -5px rgb(15 23 42 / 0.08), 0 8px 10px -6px rgb(15 23 42 / 0.08);
  --shadow-hero: 0 20px 25px -5px rgb(100 116 139 / 0.28);

  --container: 100rem; /* max-w-screen-2xl */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--slate-900);
  background: var(--slate-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--indigo-600); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--indigo-700); }

h1, h2, h3, h4, h5, h6 { color: var(--slate-800); line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 640px)  { .container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-inline: 2rem; } }

/* ==========================================================================
   Header / nav — sticky, blurred, border-b
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.site-header .container { display: flex; justify-content: space-between; align-items: center; height: 4rem; }

.site-branding { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.site-logo-mark {
  width: 2rem; height: 2rem; border-radius: var(--radius-lg);
  background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .02em;
  flex-shrink: 0;
}
.site-logo-mark svg { width: 1.15rem; height: 1.15rem; }
.site-title {
  font-size: 1.25rem; font-weight: 700; white-space: nowrap;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.site-title:hover { text-decoration: none; }

.main-navigation { display: flex; align-items: center; gap: 2rem; }
.main-navigation ul {
  display: flex; align-items: center; gap: 2rem;
  list-style: none; margin: 0; padding: 0;
}
.main-navigation a {
  color: var(--slate-600); font-weight: 500; font-size: .95rem;
}
.main-navigation a:hover { color: var(--indigo-600); }

/* "Categories" dropdown */
.nav-categories { position: relative; }
.nav-categories > button {
  display: flex; align-items: center; gap: .25rem;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--slate-600); font-weight: 500; font-size: .95rem; font-family: inherit;
}
.nav-categories > button:hover, .nav-categories > button[aria-expanded="true"] { color: var(--indigo-600); }
.nav-categories > button svg { width: .9rem; height: .9rem; transition: transform .15s ease; }
.nav-categories.open > button svg { transform: rotate(180deg); }
.nav-categories .dropdown {
  position: absolute; top: calc(100% + .75rem); left: 50%; transform: translateX(-50%) translateY(4px);
  min-width: 14rem;
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); padding: .5rem;
  opacity: 0; visibility: hidden; transition: opacity .12s ease, transform .12s ease, visibility .12s;
  display: block;
}
.nav-categories.open .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-categories .dropdown a {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .5rem .75rem; border-radius: var(--radius-md); font-size: .9rem; color: var(--slate-600);
}
.nav-categories .dropdown a:hover { background: var(--slate-50); color: var(--indigo-600); }
.nav-categories .dropdown .count { font-size: .75rem; color: var(--slate-400); }

.header-actions { display: flex; align-items: center; gap: 1rem; }

/* currency switcher */
.currency-switcher select {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--slate-200); background: #fff;
  border-radius: var(--radius-md); padding: .35rem 1.6rem .35rem .6rem;
  font-family: inherit; font-size: .8rem; font-weight: 600; color: var(--slate-600);
  cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .45rem center;
}
.currency-switcher select:hover { border-color: var(--indigo-300); color: var(--indigo-600); }

/* cart */
.cart-link { position: relative; padding: .4rem; color: var(--slate-600); display: inline-flex; }
.cart-link:hover { color: var(--indigo-600); }
.cart-link svg { width: 1.25rem; height: 1.25rem; }
.cart-count {
  position: absolute; top: -2px; right: -4px;
  min-width: 1.05rem; height: 1.05rem; padding: 0 .25rem;
  background: var(--indigo-600); color: #fff;
  font-size: .65rem; font-weight: 700; line-height: 1.05rem; text-align: center;
  border-radius: 999px; border: 2px solid #fff;
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-size: .95rem; line-height: 1;
  padding: .7rem 1.4rem; border-radius: var(--radius-lg);
  border: 1px solid transparent; cursor: pointer; transition: all .15s ease;
  font-family: inherit;
}
.btn-gradient { background: var(--indigo-600); color: #fff; }
.btn-gradient:hover { background: var(--indigo-700); color: #fff; }
.btn-ghost { background: transparent; color: var(--slate-600); border-color: var(--slate-200); }
.btn-ghost:hover { border-color: var(--indigo-300); color: var(--indigo-600); }
.btn-sm { padding: .5rem 1rem; font-size: .875rem; }
.btn-lg { padding: .95rem 1.9rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

.menu-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .5rem;
  color: var(--slate-600);
}
.menu-toggle svg { width: 1.5rem; height: 1.5rem; }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .main-navigation {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--slate-200);
    flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1rem 1rem;
    display: none; box-shadow: var(--shadow-lg);
  }
  .main-navigation.open { display: flex; }
  .main-navigation ul { flex-direction: column; align-items: stretch; gap: .25rem; }
  .main-navigation a, .nav-categories > button { display: block; padding: .6rem .5rem; }
  .nav-categories .dropdown {
    position: static; transform: none; box-shadow: none; border: 0; opacity: 1; visibility: visible;
    display: none; padding-left: .75rem;
  }
  .nav-categories.open .dropdown { display: block; }
  .header-actions .btn { display: none; }
  .header-actions .currency-switcher { display: none; }
}

/* ==========================================================================
   Hero — gradient slate-100 -> white, centered search + chips
   ========================================================================== */
.hero {
  background: linear-gradient(to bottom, var(--slate-100), #fff);
  border-bottom: 1px solid var(--slate-100);
}
.hero-inner { max-width: 48rem; margin-inline: auto; padding: 3.5rem 1rem 0; text-align: center; }
.hero-title { font-size: 2.25rem; font-weight: 700; color: var(--slate-800); line-height: 1.2; }
.hero-subtitle { color: var(--slate-500); font-size: 1.125rem; margin-top: .75rem; }
.hero-search-wrap { max-width: 48rem; margin: 1.75rem auto 0; padding-inline: 1rem; }
.hero-search { position: relative; }
.hero-search input[type="search"] {
  width: 100%; padding: 1.25rem 4.5rem 1.25rem 1.5rem;
  font-size: 1.125rem; font-family: inherit; color: var(--slate-800);
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-hero); outline: none; transition: box-shadow .15s ease, border-color .15s ease;
}
.hero-search input[type="search"]::placeholder { color: var(--slate-400); }
.hero-search input[type="search"]:focus {
  border-color: transparent; box-shadow: var(--shadow-hero), 0 0 0 2px var(--indigo-500);
}
.hero-search button[type="submit"] {
  position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
  width: 2.75rem; height: 2.75rem; border: 0; border-radius: var(--radius-lg);
  background: var(--indigo-600); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s ease;
}
.hero-search button[type="submit"]:hover { background: var(--indigo-700); }
.hero-search button[type="submit"] svg { width: 1.25rem; height: 1.25rem; }

.hero-tags { max-width: 48rem; margin: 1rem auto 0; padding: 0 1rem 2.5rem; }
.hero-tags .tags { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .375rem .8rem; border-radius: 999px;
  font-size: .875rem; font-weight: 500; color: var(--slate-600);
  background: #fff; border: 1px solid var(--slate-200); transition: all .15s ease;
}
.chip:hover { border-color: var(--indigo-300); color: var(--indigo-600); text-decoration: none; }
.chip .count { color: var(--slate-400); font-weight: 400; }

@media (max-width: 768px) { .hero-title { font-size: 1.75rem; } }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 4rem 0; }
.section-alt { background: #fff; }
.section-head { text-align: center; margin-bottom: 3rem; }
.section-head h2 { font-size: 1.875rem; font-weight: 700; }
.section-head p { color: var(--slate-500); max-width: 42rem; margin-inline: auto; }

/* "All Solutions" layout: content + sticky sidebar */
.solutions-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 1024px) { .solutions-layout { grid-template-columns: 1fr 300px; } }

.solutions-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.solutions-head h2 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.solutions-head .meta { display: flex; align-items: center; gap: .75rem; color: var(--slate-500); font-size: .875rem; }

.view-toggle { display: inline-flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg); padding: 2px; }
.view-toggle a { display: inline-flex; padding: .375rem; border-radius: .375rem; color: var(--slate-400); }
.view-toggle a:hover { color: var(--slate-600); }
.view-toggle a.active { background: var(--indigo-50); color: var(--indigo-600); }
.view-toggle svg { width: 1.05rem; height: 1.05rem; }

/* ==========================================================================
   Solution card (mirrors reference card markup)
   ========================================================================== */
.products-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem;
}
@media (min-width: 640px)  { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }

.solution-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-xl);
  overflow: hidden; transition: box-shadow .2s ease, transform .2s ease;
}
.solution-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.solution-card .card-media { position: relative; display: block; overflow: hidden; height: 10rem; background: var(--slate-100); }
.solution-card .card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.solution-card:hover .card-media img { transform: scale(1.05); }
.solution-card .price-badge {
  position: absolute; top: .75rem; right: .75rem;
  background: rgb(255 255 255 / .92); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  padding: .25rem .6rem; border-radius: var(--radius-md);
  font-size: .875rem; font-weight: 600; color: var(--slate-800);
}

.solution-card .card-body { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
.solution-card h3 { font-size: 1rem; font-weight: 700; line-height: 1.35; margin: 0 0 .5rem; }
.solution-card h3 a { color: var(--slate-800); }
.solution-card h3 a:hover { color: var(--indigo-600); }
.solution-card .type-badge {
  display: inline-block; font-size: .75rem; font-weight: 500;
  padding: .125rem .55rem; border-radius: .375rem;
  background: var(--slate-100); color: var(--slate-600); margin-bottom: .75rem; width: fit-content;
}
.solution-card .card-desc {
  color: var(--slate-500); font-size: .875rem; margin-bottom: .75rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1;
}
.solution-card .card-tags { display: flex; flex-wrap: wrap; gap: .375rem; margin-bottom: .75rem; list-style: none; padding: 0; }
.solution-card .card-tags a {
  font-size: .72rem; font-weight: 500; padding: .125rem .5rem;
  background: var(--indigo-50); color: var(--indigo-600); border-radius: .375rem;
}
.solution-card .card-tags a:hover { background: var(--indigo-100); }
.solution-card .card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  border-top: 1px solid var(--slate-100); padding-top: .75rem; margin-top: auto;
  font-size: .75rem; color: var(--slate-500);
}
.solution-card .star-rating { color: #f59e0b; letter-spacing: .05em; }
.solution-card .vendor { display: flex; align-items: center; gap: .3rem; color: var(--slate-400); }
.solution-card .vendor svg { width: .85rem; height: .85rem; color: var(--indigo-500); flex-shrink: 0; }

/* list view (view=list) */
body.view-list .products-grid { grid-template-columns: 1fr; }
body.view-list .solution-card { flex-direction: row; }
body.view-list .solution-card .card-media { width: 16rem; height: auto; flex-shrink: 0; }
@media (max-width: 640px) { body.view-list .solution-card { flex-direction: column; } body.view-list .solution-card .card-media { width: 100%; height: 10rem; } }

/* ==========================================================================
   Sidebar widgets (trending list mirrors reference)
   ========================================================================== */
.sidebar-box {
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-xl);
  padding: 1.5rem; margin-bottom: 1.5rem;
}
@media (min-width: 1024px) { .sidebar-sticky { position: sticky; top: 6rem; } }
.sidebar-box h3 {
  display: flex; align-items: center; gap: .5rem;
  font-size: .875rem; font-weight: 700; color: var(--slate-800); margin: 0 0 1rem;
}
.sidebar-box h3 svg { width: 1rem; height: 1rem; color: var(--indigo-600); }
.trend-item { display: flex; gap: .75rem; margin-bottom: .9rem; }
.trend-item:last-child { margin-bottom: 0; }
.trend-thumb { position: relative; width: 4rem; height: 4rem; border-radius: var(--radius-lg); overflow: hidden; flex-shrink: 0; background: var(--slate-100); }
.trend-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.trend-item:hover .trend-thumb img { transform: scale(1.1); }
.trend-rank {
  position: absolute; top: 0; left: 0; width: 1.25rem; height: 1.25rem;
  background: var(--indigo-600); color: #fff; font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border-bottom-right-radius: var(--radius-md);
}
.trend-info { flex: 1; min-width: 0; }
.trend-info h4 { font-size: .875rem; font-weight: 500; line-height: 1.3; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend-info h4 a { color: var(--slate-800); }
.trend-info h4 a:hover { color: var(--indigo-600); }
.trend-info .vendor { font-size: .75rem; color: var(--slate-500); margin: .125rem 0; }
.trend-info .price-row { display: flex; align-items: center; gap: .5rem; }
.trend-info .price { font-size: .875rem; font-weight: 600; color: var(--slate-800); }
.trend-info .rating { display: inline-flex; align-items: center; gap: .2rem; font-size: .75rem; color: var(--slate-400); }

.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li + li { margin-top: .25rem; }
.cat-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: .5rem .6rem; border-radius: var(--radius-md);
  color: var(--slate-600); font-size: .9rem;
}
.cat-list a:hover { background: var(--slate-50); color: var(--indigo-600); }
.cat-list .count { font-size: .75rem; color: var(--slate-400); }

/* ==========================================================================
   Tabs (Trending / Top Purchased / Top Rated)
   ========================================================================== */
.tabs { display: flex; justify-content: center; gap: .5rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.tab-btn {
  padding: .55rem 1.35rem; border-radius: 999px; border: 1px solid var(--slate-200);
  background: #fff; color: var(--slate-600); font-weight: 500; font-size: .925rem;
  cursor: pointer; font-family: inherit; transition: all .15s ease;
}
.tab-btn:hover { border-color: var(--indigo-300); color: var(--indigo-600); }
.tab-btn.active { background: var(--indigo-600); border-color: var(--indigo-600); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   How it works
   ========================================================================== */
.how-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .how-grid { grid-template-columns: repeat(3, 1fr); } }
.how-card {
  text-align: center; padding: 2rem; border-radius: var(--radius-xl);
  background: var(--slate-50); border: 1px solid var(--slate-100);
}
.how-card .step-num { font-size: 3rem; font-weight: 700; color: var(--indigo-100); line-height: 1; }
.how-card h3 { font-size: 1.25rem; font-weight: 700; margin: 1rem 0 .5rem; }
.how-card p { color: var(--slate-500); margin: 0; }

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination, .woocommerce-pagination { margin-top: 2.5rem; }
.pagination .nav-links, .woocommerce-pagination ul { display: flex; justify-content: center; gap: .375rem; list-style: none; padding: 0; margin: 0; }
.pagination a, .pagination span,
.woocommerce-pagination a, .woocommerce-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.25rem; height: 2.25rem; padding: 0 .5rem;
  border-radius: var(--radius-md); border: 1px solid var(--slate-200);
  background: #fff; color: var(--slate-600); font-size: .9rem; font-weight: 500;
}
.pagination a:hover, .woocommerce-pagination a:hover { border-color: var(--indigo-300); color: var(--indigo-600); }
.pagination .current, .woocommerce-pagination .current { background: var(--indigo-600); border-color: var(--indigo-600); color: #fff; }

/* ==========================================================================
   Footer — dark slate-900
   ========================================================================== */
.site-footer { background: var(--slate-900); color: var(--slate-400); margin-top: 4rem; }
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 2.5rem;
  padding: 3.5rem 0 2.5rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand .site-title { font-size: 1.35rem; }
.footer-brand p { margin-top: 1rem; max-width: 22rem; font-size: .925rem; color: var(--slate-400); }
.footer-col h4 { color: #fff; font-size: .95rem; font-weight: 600; margin: 0 0 1.1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li + li { margin-top: .6rem; }
.footer-col a { color: var(--slate-400); font-size: .925rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid rgb(255 255 255 / .08);
  padding: 1.5rem 0; font-size: .85rem;
}
.footer-bottom .currency-switcher select {
  background-color: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .12); color: var(--slate-300);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Content pages (articles, generic pages)
   ========================================================================== */
.page-hero {
  background: linear-gradient(to bottom, var(--slate-100), #fff);
  border-bottom: 1px solid var(--slate-100);
  padding: 3rem 0; text-align: center;
}
.page-hero h1 { font-size: 2.25rem; font-weight: 700; }
.page-hero p { color: var(--slate-500); max-width: 40rem; margin-inline: auto; }

.content-area { padding: 3.5rem 0; }
.entry-content { max-width: 48rem; margin-inline: auto; color: var(--slate-600); }
/* Cart page matches the product page width */
.woocommerce-cart .entry-content { max-width: 72rem; }
.entry-content h2, .entry-content h3 { margin-top: 2rem; }

.article-list { max-width: 48rem; margin-inline: auto; }
.article-card {
  display: block; background: #fff; border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl); padding: 1.75rem; margin-bottom: 1.25rem;
  transition: box-shadow .2s ease;
}
.article-card:hover { box-shadow: var(--shadow-lg); }
.article-card h2 { font-size: 1.25rem; margin: 0 0 .4rem; }
.article-card h2 a { color: var(--slate-800); }
.article-card h2 a:hover { color: var(--indigo-600); }
.article-card .meta { font-size: .8rem; color: var(--slate-400); margin-bottom: .6rem; }
.article-card p { color: var(--slate-500); font-size: .925rem; margin: 0; }

/* ==========================================================================
   WooCommerce: shop archive, single product, cart, account
   ========================================================================== */
.woocommerce .content-area { padding-top: 2.5rem; }
.woocommerce-breadcrumb { font-size: .85rem; color: var(--slate-500); margin-bottom: 1.5rem; }
.woocommerce-breadcrumb a { color: var(--slate-500); }
.woocommerce-breadcrumb a:hover { color: var(--indigo-600); }

.woocommerce-result-count { color: var(--slate-500); font-size: .9rem; }
.woocommerce-ordering select {
  appearance: none; border: 1px solid var(--slate-200); border-radius: var(--radius-md);
  background: #fff; padding: .45rem 2rem .45rem .75rem; font-family: inherit; font-size: .875rem;
  color: var(--slate-600); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .55rem center;
}
.woocommerce-ordering select:hover { border-color: var(--indigo-300); }
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

/* Single product — detail block capped so the top (gallery + summary)
 * never stretches to the full container width. Cart notices align with it. */
.single-product .woocommerce-breadcrumb,
.single-product .woocommerce-notices-wrapper,
.single-product .woocommerce-message,
.single-product .woocommerce-error,
.single-product .woocommerce-info,
.single-product div.product { max-width: 72rem; margin-inline: auto; }
.single-product .product { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 900px) { .single-product .product { grid-template-columns: 1.1fr 1fr; } }
.single-product .woocommerce-product-gallery__image { border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--slate-200); }
.product_title { font-size: 2rem; font-weight: 700; }
.woocommerce-product-details__short-description { color: var(--slate-500); }
.price, .product p.price, .product span.price { color: var(--slate-800); font-size: 1.5rem; font-weight: 700; }
.price del { color: var(--slate-400); font-weight: 400; font-size: 1.1rem; margin-right: .5rem; }
.price ins { text-decoration: none; }

.quantity input {
  width: 4.5rem; padding: .7rem .75rem; border: 1px solid var(--slate-200);
  border-radius: var(--radius-md); font-family: inherit; font-size: 1rem; text-align: center;
}
.single_add_to_cart_button, .woocommerce button.button.alt, .woocommerce a.button.alt {
  background: var(--indigo-600) !important; color: #fff !important;
  border-radius: var(--radius-lg) !important; font-weight: 600 !important;
  padding: .95rem 2.2rem !important; font-size: 1.05rem !important; transition: background .15s ease;
}
.single_add_to_cart_button:hover, .woocommerce button.button.alt:hover, .woocommerce a.button.alt:hover { background: var(--indigo-700) !important; }

.woocommerce-tabs ul.tabs { display: flex; gap: .5rem; border-bottom: 1px solid var(--slate-200); padding: 0; margin: 3rem 0 1.5rem; list-style: none; }
.woocommerce-tabs ul.tabs li { background: none; border: 0; margin: 0; padding: 0; }
.woocommerce-tabs ul.tabs li a {
  display: block; padding: .75rem 1.1rem; font-weight: 500; color: var(--slate-500);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.woocommerce-tabs ul.tabs li.active a { color: var(--indigo-600); border-bottom-color: var(--indigo-600); }
.woocommerce-Tabs-panel { color: var(--slate-600); max-width: 52rem; }

.woocommerce-review__author { font-weight: 600; }
.star-rating { color: #f59e0b; font-size: .9rem; }
.woocommerce-product-rating .star-rating { float: none; display: inline-block; }

.related.products > h2, .upcells > h2, .crosssells > h2 { font-size: 1.5rem; margin: 3rem 0 1.5rem; }

/* notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  border-top-color: var(--indigo-600); background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 1rem 1.25rem; color: var(--slate-600);
  list-style: none;
}
.woocommerce-message::before, .woocommerce-info::before { color: var(--indigo-600); }
.woocommerce-message a.button, .woocommerce-info a.button, .woocommerce a.button {
  background: var(--indigo-50); color: var(--indigo-600); border-radius: var(--radius-md);
  padding: .5rem 1rem; font-weight: 500; font-size: .875rem;
}
.woocommerce-message a.button:hover { background: var(--indigo-100); }

/* cart / checkout tables */
.woocommerce table.shop_table {
  border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  border-collapse: separate; border-spacing: 0; overflow: hidden;
}
.woocommerce table.shop_table th { background: var(--slate-50); color: var(--slate-700); font-size: .875rem; }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { padding: .85rem 1rem; }
.woocommerce-cart .actions .button, .woocommerce .actions button.button {
  background: var(--slate-100); color: var(--slate-700); border-radius: var(--radius-md);
  padding: .6rem 1.1rem; font-weight: 500;
}
.woocommerce-cart .actions .button:hover { background: var(--slate-200); }

#add_payment_method #payment, .woocommerce-cart #payment, .woocommerce-checkout #payment {
  background: var(--slate-50); border-radius: var(--radius-lg); border: 1px solid var(--slate-200);
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row .select2-container--default .select2-selection--single {
  border: 1px solid var(--slate-200); border-radius: var(--radius-md);
  padding: 0 .8rem; height: 2.9rem; width: 100%;
  font-family: inherit; font-size: .95rem; color: var(--slate-800); background: #fff;
}
.woocommerce form .form-row textarea {
  border: 1px solid var(--slate-200); border-radius: var(--radius-md);
  padding: .65rem .8rem; min-height: 6rem; width: 100%;
  font-family: inherit; font-size: .95rem; color: var(--slate-800); background: #fff;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row select:focus { border-color: var(--indigo-500); outline: none; box-shadow: 0 0 0 2px var(--indigo-100); }

/* Select2 container copies the (auto-width) select's px width inline — force full width */
.woocommerce .select2-container { width: 100% !important; }

/* Select2 (country / state) — line the rendered value and arrow up with the 2.9rem box */
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 2.9rem; padding-left: .8rem; color: var(--slate-800);
}
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 100%; top: 0; }
.select2-dropdown { border-color: var(--slate-200); border-radius: var(--radius-md); }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--indigo-600); }

/* First / last name share one row (form-row-first / form-row-last) */
.woocommerce form .form-row-first { float: left; width: 48%; margin-right: 4%; }
.woocommerce form .form-row-last { float: right; width: 48%; }
.woocommerce form .form-row-wide { clear: both; width: 100%; }
.woocommerce form .form-row::before, .woocommerce form .form-row::after { content: " "; display: table; }
.woocommerce form .form-row::after { clear: both; }

/* PayPal is the only gateway — hide the redundant "PayPal / Pay via PayPal."
 * radio label + description; the smart button below still handles payment. */
.woocommerce-checkout .wc_payment_methods .payment_method_ppcp-gateway > input.input-radio,
.woocommerce-checkout .wc_payment_methods .payment_method_ppcp-gateway > label,
.woocommerce-checkout .wc_payment_methods .payment_method_ppcp-gateway .payment_box { display: none; }
.woocommerce-checkout .wc_payment_methods { margin: 0; padding: 0; list-style: none; }

/* Checkout two-column layout: billing + additional info left, order review right */
@media (min-width: 961px) {
  .woocommerce-checkout .entry-content { max-width: 76rem; }
  .woocommerce-checkout #customer_details.col2-set { float: left; width: 56%; margin: 0; }
  .woocommerce-checkout #customer_details .col-1,
  .woocommerce-checkout #customer_details .col-2 { float: none; width: 100%; }
  .woocommerce-checkout #order_review_heading,
  .woocommerce-checkout #order_review { float: right; width: 38%; clear: right; margin-top: 0; }
  .woocommerce-checkout form.woocommerce-checkout::after { content: ""; display: table; clear: both; }
}

/* My account nav */
.woocommerce-account .woocommerce-MyAccount-navigation { float: none; width: 100%; margin-bottom: 2rem; }
.woocommerce-MyAccount-navigation ul {
  display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0;
}
.woocommerce-MyAccount-navigation a {
  display: inline-block; padding: .5rem 1rem; border-radius: var(--radius-md);
  background: #fff; border: 1px solid var(--slate-200); color: var(--slate-600); font-size: .9rem; font-weight: 500;
}
.woocommerce-MyAccount-navigation li.is-active a { background: var(--indigo-600); border-color: var(--indigo-600); color: #fff; }
.woocommerce-MyAccount-content { float: none; width: 100%; }

/* login / register forms */
.woocommerce form.login, .woocommerce form.register {
  border: 1px solid var(--slate-200); border-radius: var(--radius-xl); padding: 2rem;
}
.woocommerce form.login .form-row .woocommerce-form__label-for-checkbox { display: flex; align-items: center; gap: .4rem; }

/* widget price filter etc. */
.widget { margin-bottom: 2rem; }
.widget-title { font-size: 1.05rem; font-weight: 700; }
.widget ul { list-style: none; padding: 0; }

/* onsale badge */
.woocommerce span.onsale {
  background: #dc2626; border-radius: var(--radius-md); font-size: .75rem; font-weight: 600;
  padding: .25rem .6rem; min-height: 0; line-height: 1.4; top: .75rem; left: .75rem; right: auto; margin: 0;
}

/* empty states */
.woocommerce .cart-empty, .woocommerce .no-products-found { color: var(--slate-500); text-align: center; padding: 3rem 1rem; }

/* ==========================================================================
   Small screens
   ========================================================================== */
@media (max-width: 768px) {
  .section { padding: 2.5rem 0; }
  .solutions-head { flex-direction: column; align-items: flex-start; }
  .single-product .product { gap: 1.5rem; }
  .product_title { font-size: 1.5rem; }
}

/* Shop archive header meta row */
.solutions-head h1 { margin: 0; }
.solutions-head .meta { flex-wrap: wrap; }
.solutions-head .woocommerce-ordering { margin: 0; }
