/*
Theme Name: PetSupplies
Theme URI: https://petsupplies.example.com
Author: PetSupplies Team
Author URI: https://petsupplies.example.com
Description: A modern pet supplies FSE block theme inspired by Chewy.com — clean, warm, and built for pet e-commerce. Full Site Editing ready with WooCommerce support, responsive layout, and a friendly blue-and-orange palette. Visual editing via WordPress Site Editor — no code required.
Version: 2.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: petsupplies
Tags: e-commerce, pet-store, full-site-editing, block-theme, block-patterns, woocommerce, responsive-layout, accessibility-ready, custom-colors, custom-header

PetSupplies WordPress Theme, (C) 2026 PetSupplies Team.
PetSupplies is distributed under the terms of the GNU GPL v2 or later.
*/

/* ============================================
   Custom CSS — beyond what theme.json covers
   ============================================ */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  transition: color 0.15s ease;
}

/* ---------- Promo Bar ---------- */
.header-promo {
  font-size: 0.85rem;
  text-align: center;
  position: relative;
}

.header-promo a {
  text-decoration: underline;
  font-weight: 600;
}

.header-promo__close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.8;
  font-size: 1.2rem;
}

.header-promo__close:hover {
  opacity: 1;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #E0E0E0;
}

.site-header .wp-block-search__input {
  border-radius: 24px;
  padding: 10px 48px 10px 20px;
  border: 2px solid #E0E0E0;
  background: #FAFAFA;
  font-size: 0.95rem;
}

.site-header .wp-block-search__input:focus {
  border-color: #1C49C2;
  box-shadow: 0 0 0 3px rgba(28, 73, 194, 0.1);
  background: #fff;
}

.site-header .wp-block-search__button {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  background: #FF6B35;
  margin-left: -44px;
  position: relative;
  z-index: 2;
}

.site-header .wp-block-search__button:hover {
  background: #E55A2B;
}

/* Sticky header shadow */
.site-header:has(.wp-block-group) {
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ---------- Navigation ---------- */
.main-navigation {
  border-top: 1px solid #E0E0E0;
}

.wp-block-navigation .wp-block-navigation-item {
  font-size: 0.9rem;
  font-weight: 500;
}

.wp-block-navigation .wp-block-navigation-item a:hover {
  color: #1C49C2;
  background: rgba(28, 73, 194, 0.05);
}

/* Navigation submenu */
.wp-block-navigation .wp-block-navigation__submenu-container {
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* ---------- Product Grid Overrides ---------- */
/* Force WooCommerce product blocks to 5 columns on front page */
.wc-block-product-template {
  gap: 24px;
}

/* Ensure 5-column product grid */
.wc-block-grid__products {
  gap: 24px;
}

/* Product card hover */
.wc-block-product .wc-block-product__image img {
  transition: transform 0.5s ease;
}

.wc-block-product:hover .wc-block-product__image img {
  transform: scale(1.05);
}

/* Sale badge */
.wc-block-product .wc-block-product__badge--onsale,
.wc-block-components-sale-badge {
  background: #D32F2F !important;
  border-radius: 4px !important;
  padding: 4px 10px !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
}

/* ---------- Category Cards ---------- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 24px;
}

.category-card {
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  padding: 32px 16px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #1A1A1A;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  border-color: #3B6DE0;
}

.category-card__icon {
  width: 80px;
  height: 80px;
  background: #FFF0EB;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  transition: transform 0.3s ease;
}

.category-card:hover .category-card__icon {
  transform: scale(1.1);
  background: #FF6B35;
}

.category-card__name {
  font-weight: 600;
  font-size: 1rem;
}

.category-card__count {
  font-size: 0.8rem;
  color: #999;
}

/* ---------- Trust Bar ---------- */
.trust-bar {
  padding: 32px 0;
  border-bottom: 1px solid #E0E0E0;
}

.trust-bar__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #666;
}

.trust-bar__icon {
  font-size: 1.5rem;
}

/* ---------- Deal Banner ---------- */
.deal-banner {
  background: linear-gradient(90deg, #FFF5F0, #FFEDE5);
  border: 1px solid #FFD4C0;
  border-radius: 12px;
  padding: 24px 32px;
}

.deal-banner__timer-digit {
  background: #1A1A1A;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 32px;
  text-align: center;
  display: inline-block;
}

/* ---------- Testimonials ---------- */
.testimonial-card {
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  padding: 32px;
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  left: 24px;
  font-size: 4rem;
  color: #1C49C2;
  opacity: 0.15;
  line-height: 1;
  font-family: serif;
}

.testimonial-card__text {
  font-style: italic;
  margin-bottom: 16px;
  position: relative;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.testimonial-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
}

/* ---------- Newsletter ---------- */
.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 16px;
  font-size: 1rem;
  outline: none;
}

.newsletter-form button {
  padding: 14px 32px;
  background: #FF6B35;
  color: #fff;
  border: none;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.newsletter-form button:hover {
  background: #E55A2B;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0D1B3E;
}

.site-footer a {
  color: #b8c9e0;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.site-footer .wp-block-social-link:hover {
  background: #1C49C2 !important;
}

.site-footer .wp-block-separator {
  opacity: 0.15;
}

/* ---------- Scroll to Top ---------- */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: #1C49C2;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s ease;
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: #0D2E8A;
  transform: translateY(-2px);
}

/* ---------- 404 Page ---------- */
.error-404 {
  text-align: center;
  padding: 80px 0;
}

.error-404__code {
  font-size: 8rem;
  font-weight: 900;
  color: #1C49C2;
  line-height: 1;
  opacity: 0.2;
}

/* ---------- Blog / Content ---------- */
.wp-block-post-content {
  line-height: 1.8;
}

.wp-block-post-content blockquote {
  border-left: 4px solid #1C49C2;
  padding-left: 24px;
  color: #666;
  font-style: italic;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-size: 0.85rem;
  color: #999;
  padding: 16px 0;
}

.breadcrumbs a {
  color: #666;
}

.breadcrumbs a:hover {
  color: #1C49C2;
}

/* ---------- Animations ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 768px) {
  .site-header .wp-block-search {
    max-width: 100%;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .trust-bar .wp-block-group {
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .scroll-top {
    bottom: 16px;
    right: 16px;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .site-footer,
  .scroll-top,
  .header-promo,
  .newsletter-section {
    display: none !important;
  }
}
