/*
Theme Name: ®Shree Sweets
Description: Premium WooCommerce theme for ®Shree Sweets Indore, featuring a high-performance Tailwind CSS architecture and Shopify-inspired UX.
Version: 1.1.0
Author: Simbolo
Text Domain: shreesweets
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: e-commerce, woocommerce, tailwind, premium, clean, responsive-layout
*/

/* CSS Custom Properties - Brand Colors */
:root {
  --brand-orange: #F4821F;
  --brand-orange-dark: #D96B10;
  --brand-orange-light: #FEF3E8;
  --brand-red: #C0392B;
  --brand-green: #27AE60;
  --brand-ink: #1A1A1A;
  --brand-ink2: #555555;
  --brand-ink3: #888888;
  --brand-line: #E8E8E8;
  --brand-bg: #ffffff;
  --brand-bg2: #F8F3EC;
  --brand-bg3: #F2EBE0;
}

/* Base styles */
html, body {
  overscroll-behavior-x: none;
}
* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  background-color: var(--brand-bg);
  color: var(--brand-ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
  margin: 0;
}

/* Desktop breathing room — cap content at 1600px on ultra-wide screens */
@media (min-width: 1600px) {
  .site-main > *,
  header > div,
  footer > div {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', ui-serif, Georgia, serif;
  font-weight: bold;
  line-height: 1.2;
  margin: 0 0 1rem 0;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }

p {
  margin: 0 0 1rem 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Utilities - Exact match from React */
@layer utilities {
  .animate-in {
    animation-duration: 0.5s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }

  .fade-in {
    animation-name: fadeIn;
  }

  .no-scrollbar::-webkit-scrollbar {
    display: none;
  }

  .no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
}


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

.skeleton {
  background: #f6f7f8;
  background: linear-gradient(to right, #eeeeee 8%, #dddddd 18%, #eeeeee 33%);
  background-size: 1000px 100%;
  animation: shimmer 2s linear infinite;
}

.product-card img {
  aspect-ratio: 1/1;
  object-fit: cover;
  width: 100%;
}

/* Component Styles */
/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 12px 22px;
  background-color: var(--brand-orange);
  color: white;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background 0.2s ease, transform 0.15s ease;
  border: none;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  background-color: #d86f14;
  transform: translateY(-1px);
}


.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--brand-ink);
  color: var(--brand-ink);
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  background-color: transparent;
  cursor: pointer;
  font-size: 0.875rem;
}

.btn-secondary:hover {
  background-color: var(--brand-ink);
  color: white;
}

.nav-link {
    padding: 1.125rem 1.25rem;
    font-size: 13px;
    font-weight: 500;
    color: var(--brand-ink2);
    white-space: nowrap;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--brand-orange);
    border-bottom-color: var(--brand-orange);
}

.nav-link.current-menu-item,
.nav-link.current_page_item {
    color: var(--brand-orange);
    border-bottom-color: var(--brand-orange);
}

/* Form Styles */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--brand-line);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(244, 130, 31, 0.1);
}

/* Card Styles */
.card {
  background-color: var(--brand-bg);
  border: 1px solid var(--brand-line);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-hover {
  transition: all 0.2s ease;
}

.card-hover:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Hero Slider - Swiper Premium Styles */
.hero-swiper {
    width: 100%;
    height: 100%;
}

.hero-swiper .swiper-slide-active .absolute.inset-0 {
    animation: kenburns 20s ease infinite alternate;
}

@keyframes kenburns {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

.hero-swiper .swiper-pagination-bullet {
    width: 32px !important;
    height: 2px !important;
    border-radius: 0 !important;
    background: #000 !important;
    opacity: 0.2 !important;
    transition: all 0.4s ease !important;
    margin: 0 4px !important;
}

.hero-swiper .swiper-pagination-bullet-active {
    opacity: 1 !important;
    width: 64px !important;
    background: #000 !important;
}

.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: var(--brand-ink);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.hero-swiper .swiper-button-next:after,
.hero-swiper .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover {
    background: #fff;
    transform: scale(1.1);
}

/* Product Card - Exact match from React */
.product-card {
  background-color: var(--brand-bg);
  border: 1.5px solid var(--brand-line);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.09);
  transform: translateY(-2px);
  border-color: #e0d8d0;
}

.product-image {
  aspect-ratio: 1;
  background-color: var(--brand-bg2);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-content {
  padding: 0.75rem 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  border-top: 1px solid var(--brand-line);
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.02em;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.625rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.product-rating-stars {
  color: var(--brand-orange);
  font-size: 10px;
  letter-spacing: 0.025em;
  line-height: 1;
}

.product-rating-score {
  font-size: 10.5px;
  color: var(--brand-ink);
  font-weight: 600;
}

.product-rating-count {
  font-size: 9.5px;
  color: var(--brand-ink3);
}

/* ── UNIFIED SECTION HEADINGS ── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand-orange);
  margin-bottom: 6px;
  display: block;
}

.section-heading {
  font-size: 30px;
  font-weight: bold;
  color: #111;
  line-height: 1.2;
  font-family: 'Playfair Display', Georgia, serif;
  margin: 0;
}

/* ── SECTION SPACING ── */
.home-section {
  padding: 32px 0;
}

@media (max-width: 768px) {
  .home-section {
    padding: 24px 0;
  }
  .section-heading {
    font-size: 24px;
  }
}

/* ── PRODUCT GRID GAP ── */
.products.columns-2,
.products.columns-3,
.products.columns-4 {
  gap: 24px !important;
  display: grid;
}

@media (min-width: 768px) {
    .products.columns-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Shop Page Specific Styles */
.shop-tweaks {
  background-color: var(--brand-bg2);
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  gap: 1rem;
  display: flex;
  align-items: center;
}

.shop-tweaks-button {
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  background-color: white;
  border: 1px solid var(--brand-line);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.shop-tweaks-button.active {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  font-weight: 600;
  background-color: rgba(244, 130, 31, 0.05);
}

/* Filter Styles */
.shop-filter {
  padding: 1.5rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.shop-filter:first-child {
  padding-top: 0;
}

.shop-filter h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-ink);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


.shop-filter-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  font-size: 12.5px;
  color: var(--brand-ink2);
  cursor: pointer;
  transition: color 0.2s ease;
}

.shop-filter-label:hover {
  color: var(--brand-orange);
}

.shop-filter-checkbox {
  appearance: none;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--brand-line);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.shop-filter-checkbox:checked {
  background-color: var(--brand-orange);
  border-color: var(--brand-orange);
}

.shop-filter-checkbox:checked::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 10px;
  font-weight: 700;
  top: -1px;
  left: 1px;
  opacity: 1;
}

.shop-filter-checkbox::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 10px;
  font-weight: 700;
  top: -1px;
  left: 1px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.shop-filter-count {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--brand-ink3);
}

/* Price Range Slider */
.shop-price-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.shop-price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-orange);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.shop-price-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-orange);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.shop-price-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--brand-ink3);
  margin-top: 0.75rem;
  font-weight: 500;
}

/* Product Grid */
.product-grid {
  display: grid;
  gap: 1rem 1.25rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.5rem;
  }
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem 2rem;
  }
}

/* Minimal Card Style */
.product-card.minimal .product-rating,
.product-card.minimal .product-rating-stars,
.product-card.minimal .product-rating-score,
.product-card.minimal .product-rating-count {
  display: none;
}

.product-card.minimal .product-content {
  padding: 0.75rem;
}

.product-card.minimal .product-price {
  font-size: 13px;
}

/* Sort Dropdown */
.shop-sort-select {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background-color: white;
  color: var(--brand-ink);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.shop-sort-select:focus {
  outline: none;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(244, 130, 31, 0.1);
}

/* Pagination */
.shop-pagination {
  display: flex;
  gap: 0.375rem;
  justify-content: center;
  margin-top: 2.25rem;
}

.shop-pagination-button {
  min-width: 36px;
  height: 36px;
  padding: 0 0.625rem;
  border: 1.5px solid var(--brand-line);
  border-radius: 0.375rem;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.shop-pagination-button:hover {
  background-color: var(--brand-orange);
  color: white;
  border-color: var(--brand-orange);
}

.shop-pagination-button.active {
  background-color: var(--brand-orange);
  color: white;
  border-color: var(--brand-orange);
}

/* WooCommerce Customizations */
.woocommerce .woocommerce-notices-wrapper {
  margin-bottom: 2rem;
}

.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error {
  border-radius: 0.5rem;
  border: none;
  background-color: var(--brand-orange-light);
  color: var(--brand-ink);
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--brand-orange);
}

.woocommerce .woocommerce-message::before,
.woocommerce .woocommerce-info::before,
.woocommerce .woocommerce-error::before {
  color: var(--brand-orange);
  margin-right: 0.5rem;
}

/* Product Gallery */
.woocommerce-product-gallery {
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}

.woocommerce-product-gallery.loaded {
  opacity: 1;
}

.woocommerce-product-gallery img {
  border-radius: 0.75rem;
  transition: transform 0.3s ease;
}

.woocommerce-product-gallery img:hover {
  transform: scale(1.02);
}

/* Quantity Input */
.woocommerce .quantity {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1rem;
}

.woocommerce .quantity input {
  width: 4rem;
  text-align: center;
  border: 1px solid var(--brand-line);
  border-radius: 0.375rem;
  padding: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.woocommerce .quantity .qty:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(244, 130, 31, 0.1);
}

/* Buttons */
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button {
  background-color: var(--brand-orange);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button:hover {
  background-color: var(--brand-orange-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(244, 130, 31, 0.3);
}

.woocommerce button.button.alt,
.woocommerce input.button.alt {
  background-color: transparent;
  color: var(--brand-ink);
  border: 2px solid var(--brand-ink);
}

.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
  background-color: var(--brand-ink);
  color: white;
}

/* Form Elements */
.woocommerce form .form-row {
  margin-bottom: 1.5rem;
}

.woocommerce form .form-row label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--brand-ink);
}

.woocommerce form input[type="text"],
.woocommerce form input[type="email"],
.woocommerce form input[type="tel"],
.woocommerce form input[type="password"],
.woocommerce form select,
.woocommerce form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--brand-line);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.woocommerce form input[type="text"]:focus,
.woocommerce form input[type="email"]:focus,
.woocommerce form input[type="tel"]:focus,
.woocommerce form input[type="password"]:focus,
.woocommerce form select:focus,
.woocommerce form textarea:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(244, 130, 31, 0.1);
  outline: none;
}

/* Checkout Layout */
.woocommerce-checkout #customer_details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .woocommerce-checkout #customer_details {
    grid-template-columns: 1fr 1fr;
  }
}

.woocommerce-checkout .col-1,
.woocommerce-checkout .col-2 {
  background: var(--brand-bg);
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--brand-line);
}

/* Cart Table */
.woocommerce-cart table.cart {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  margin-bottom: 2rem;
}

.woocommerce-cart table.cart th,
.woocommerce-cart table.cart td {
  padding: 1rem;
  border-bottom: 1px solid var(--brand-line);
  vertical-align: middle;
}

.woocommerce-cart table.cart th {
  background-color: var(--brand-bg2);
  font-weight: 600;
  color: var(--brand-ink);
}

/* Cart Totals */
.woocommerce .cart_totals {
  background: var(--brand-bg);
  border: 1px solid var(--brand-line);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.woocommerce .cart_totals h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--brand-ink);
}

/* Breadcrumbs */
.woocommerce .woocommerce-breadcrumb {
  font-size: 0.875rem;
  color: var(--brand-ink3);
  margin-bottom: 2rem;
}

.woocommerce .woocommerce-breadcrumb a {
  color: var(--brand-orange);
}

.woocommerce .woocommerce-breadcrumb a:hover {
  color: var(--brand-orange-dark);
}

/* Pagination */
.woocommerce nav.woocommerce-pagination {
  margin-top: 3rem;
}

.woocommerce nav.woocommerce-pagination ul {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.woocommerce nav.woocommerce-pagination ul li {
  border: 1px solid var(--brand-line);
  border-radius: 0.375rem;
  overflow: hidden;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--brand-ink2);
  text-decoration: none;
}

.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current {
  background-color: var(--brand-orange);
  color: white;
}

/* Loading States */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--brand-orange);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation-duration: 0.5s;
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-up {
  animation: slideInUp 0.6s ease-out;
}

/* Critical layout fixes */
.h-64 { height: 16rem; }
.h-96 { height: 24rem; }
.max-w-xl { max-width: 36rem; }
/* gap-4.5 is defined in tailwind.config.js under extend.spacing */

/* Utilities */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Force Header fixed if sticky fails */
#masthead {
  width: 100%;
  z-index: 50;
}

/* Ensure empty states look professional */
.widget_product_categories ul,
.widget_layered_nav ul {
  list-style: none;
  padding: 0;
}

.widget_product_categories li,
.widget_layered_nav li {
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0;
  font-size: 0.8125rem;
  color: var(--brand-ink2);
}

.widget_product_categories li a:hover {
  color: var(--brand-orange);
}

.widget_product_categories span.count {
  font-size: 0.6875rem;
  color: var(--brand-ink3);
}

/* Shop Page Background */
body.page-template-template-shop {
  background-color: #f9fafb;
}

body.page-template-template-shop main {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

/* Custom WooCommerce button styling */
.custom-woo-button .button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  background-color: var(--brand-orange);
  color: white;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.custom-woo-button .button:hover {
  background-color: var(--brand-orange-dark);
  transform: translateY(-1px);
}
