/* ============================================
   KALINKA THEME - Custom Styles
   ============================================ */

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Body base */
body { overflow-x: hidden; }

/* Headings use Varela Round by default */
h1, h2, h3, h4, h5, h6 { font-family: 'Varela Round', sans-serif; }

/* ---- Animations (keyframes) ---- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(3deg); }
}
@keyframes bounce-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes pulse-soft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
@keyframes fade-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes scale-in {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes slide-up {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Animation utility classes */
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-float-slow { animation: float-slow 4s ease-in-out infinite; }
.animate-bounce-soft { animation: bounce-soft 2s ease-in-out infinite; }
.animate-pulse-soft { animation: pulse-soft 3s ease-in-out infinite; }
.animate-fade-in { animation: fade-in 0.5s ease-out; }
.animate-scale-in { animation: scale-in 0.3s ease-out; }
.animate-slide-up { animation: slide-up 0.5s ease-out; }

/* Grain overlay effect */
.grain-overlay { position: relative; }
.grain-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F5F1E8; }
::-webkit-scrollbar-thumb { background: #E53935; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #c62828; }

/* Selection color */
::selection { background: rgba(229, 57, 53, 0.2); color: #333; }

/* Hide scrollbar for horizontal scroll containers */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* Line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Header ---- */
#site-header { transition: all 0.5s ease-out; }
#site-header .navbar-inner { transition: all 0.5s; }

/* ---- Product Card Hover Effects ---- */
.product-card { transition: all 0.5s; }
.product-card:hover { transform: translateY(-0.5rem); box-shadow: 0 12px 40px rgba(0,0,0,0.15); }
.product-card .product-actions { opacity: 0; transition: opacity 0.3s; }
.product-card:hover .product-actions { opacity: 1; }
.product-card .quick-add { transform: translateY(100%); opacity: 0; transition: all 0.5s; }
.product-card:hover .quick-add { transform: translateY(0); opacity: 1; }
.product-card .product-image { transition: transform 0.7s; }
.product-card:hover .product-image { transform: scale(1.1); }

/* ---- Testimonial Cards ---- */
.testimonial-card { transition: all 0.5s ease-out; }

/* ---- Category Card Hover ---- */
.category-card .category-image { transition: transform 0.7s; }
.category-card:hover .category-image { transform: scale(1.1); }
.category-card .category-hover-content { opacity: 0; transition: opacity 0.3s; }
.category-card:hover .category-hover-content { opacity: 1; }
.category-card .category-content-inner { transition: transform 0.3s; }
.category-card:hover .category-content-inner { transform: translateY(-0.5rem); }

/* WordPress admin bar fix */
body.admin-bar #site-header { top: calc(1rem + 32px); }
@media screen and (max-width: 782px) {
  body.admin-bar #site-header { top: calc(1rem + 46px); }
}

/* ============================================
   WooCommerce Overrides
   ============================================ */

/* ---- Shop / Archive product grid ---- */
.kalinka-products-grid ul.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (min-width: 640px) {
  .kalinka-products-grid ul.products { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .kalinka-products-grid ul.products { grid-template-columns: repeat(4, 1fr); }
}

.kalinka-products-grid ul.products li.product {
  background: #fff;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.5s;
  padding: 0;
  margin: 0;
}
.kalinka-products-grid ul.products li.product:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

/* Product image in grid */
.kalinka-products-grid li.product a img,
.kalinka-products-grid li.product .woocommerce-LoopProduct-link img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: transform 0.7s;
}
.kalinka-products-grid li.product:hover img {
  transform: scale(1.1);
}

/* Product title */
.kalinka-products-grid li.product .woocommerce-loop-product__title {
  font-family: 'Varela Round', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: #333;
  padding: 0 1rem;
  margin-top: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Product price */
.kalinka-products-grid li.product .price {
  padding: 0.25rem 1rem 0;
  font-weight: 700;
  color: #E53935;
  font-size: 0.95rem;
}
.kalinka-products-grid li.product .price del {
  color: #666;
  font-weight: 400;
  font-size: 0.85rem;
}
.kalinka-products-grid li.product .price ins {
  text-decoration: none;
  color: #E53935;
}

/* Add to cart button in grid */
.kalinka-products-grid li.product .button,
.kalinka-products-grid li.product .add_to_cart_button {
  display: block;
  margin: 0.75rem 1rem 1rem;
  background: #E53935;
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 0.6rem 1rem;
  font-family: 'Varela Round', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s;
  text-decoration: none;
}
.kalinka-products-grid li.product .button:hover,
.kalinka-products-grid li.product .add_to_cart_button:hover {
  background: #c62828;
}

/* On-sale badge */
.kalinka-products-grid li.product .onsale {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: #E53935;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  z-index: 5;
}
.kalinka-products-grid li.product > a {
  position: relative;
  display: block;
}

/* ---- WC ordering dropdown ---- */
.wc-ordering-wrap .woocommerce-ordering select {
  background: #F5F1E8;
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 0.5rem 2rem 0.5rem 1rem;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.875rem;
  color: #333;
  outline: none;
  cursor: pointer;
  transition: border-color 0.3s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}
.wc-ordering-wrap .woocommerce-ordering select:focus {
  border-color: #E53935;
}

/* ---- WC pagination ---- */
.woocommerce nav.woocommerce-pagination {
  text-align: center;
}
.woocommerce nav.woocommerce-pagination ul {
  display: inline-flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  border: none;
}
.woocommerce nav.woocommerce-pagination ul li {
  border: none;
  padding: 0;
  margin: 0;
}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  font-family: 'Varela Round', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.3s;
  border: none;
  background: #fff;
  color: #333;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.woocommerce nav.woocommerce-pagination ul li a:hover {
  background: #E53935;
  color: #fff;
}
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: #E53935;
  color: #fff;
}

/* ---- WC Breadcrumbs ---- */
.woocommerce-breadcrumb {
  font-size: 0.875rem;
  color: #666;
}
.woocommerce-breadcrumb a {
  color: #E53935;
  text-decoration: none;
  transition: color 0.3s;
}
.woocommerce-breadcrumb a:hover {
  color: #c62828;
}

/* ---- WC Notices / Messages ---- */
.woocommerce-message,
.woocommerce-info {
  background: #fff;
  border-top: 3px solid #E53935;
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
  color: #333;
  font-size: 0.875rem;
}
.woocommerce-message::before,
.woocommerce-info::before {
  color: #E53935;
}
.woocommerce-error {
  background: #fff;
  border-top: 3px solid #c62828;
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
  list-style: none;
}
.woocommerce-message .button,
.woocommerce-info .button {
  background: #E53935;
  color: #fff;
  border-radius: 9999px;
  padding: 0.4rem 1.2rem;
  font-size: 0.8rem;
  text-decoration: none;
  transition: background 0.3s;
}
.woocommerce-message .button:hover,
.woocommerce-info .button:hover {
  background: #c62828;
}

/* ---- WC Cart page ---- */
.woocommerce table.shop_table {
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.woocommerce table.shop_table th {
  background: #F5F1E8;
  font-family: 'Varela Round', sans-serif;
  font-weight: 700;
  color: #333;
  padding: 1rem;
  border: none;
}
.woocommerce table.shop_table td {
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
  color: #333;
}
.woocommerce table.shop_table img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 0.75rem;
}
.woocommerce table.shop_table .product-remove a {
  color: #E53935;
  font-size: 1.2rem;
}
.woocommerce table.shop_table .quantity .qty {
  width: 3.5rem;
  padding: 0.4rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  text-align: center;
}

/* Cart totals */
.woocommerce .cart_totals h2 {
  font-family: 'Varela Round', sans-serif;
  font-weight: 700;
  color: #333;
}
.woocommerce .cart_totals .checkout-button,
.woocommerce .wc-proceed-to-checkout .checkout-button {
  background: #E53935 !important;
  color: #fff !important;
  border-radius: 9999px !important;
  padding: 0.75rem 2rem !important;
  font-family: 'Varela Round', sans-serif !important;
  font-weight: 600 !important;
  text-decoration: none;
  transition: background 0.3s !important;
}
.woocommerce .cart_totals .checkout-button:hover,
.woocommerce .wc-proceed-to-checkout .checkout-button:hover {
  background: #c62828 !important;
}

/* Coupon input */
.woocommerce .coupon .input-text {
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  outline: none;
  transition: border-color 0.3s;
}
.woocommerce .coupon .input-text:focus {
  border-color: #E53935;
}
.woocommerce .coupon .button {
  background: #333;
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  transition: background 0.3s;
}
.woocommerce .coupon .button:hover {
  background: #E53935;
}

/* Update cart button */
.woocommerce button[name="update_cart"] {
  background: #333 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 0.5rem 1.5rem !important;
  cursor: pointer !important;
  transition: background 0.3s !important;
}
.woocommerce button[name="update_cart"]:hover {
  background: #E53935 !important;
}

/* ---- WC Checkout ---- */
.woocommerce form .form-row label {
  font-weight: 500;
  color: #333;
  font-size: 0.875rem;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.65rem 1rem;
  font-family: 'Open Sans', sans-serif;
  color: #333;
  outline: none;
  transition: border-color 0.3s;
  width: 100%;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  border-color: #E53935;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.woocommerce #place_order {
  background: #E53935 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 0.85rem 2.5rem !important;
  font-family: 'Varela Round', sans-serif !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  transition: background 0.3s !important;
  box-shadow: 0 4px 20px rgba(229,57,53,0.3) !important;
}
.woocommerce #place_order:hover {
  background: #c62828 !important;
}

/* Checkout payment box */
.woocommerce-checkout #payment {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: none;
}
.woocommerce-checkout #payment ul.payment_methods {
  border-bottom: 1px solid #f0f0f0;
  padding: 1rem;
}

/* ---- WC My Account ---- */
.woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.woocommerce-MyAccount-navigation ul li {
  border-bottom: 1px solid #f0f0f0;
}
.woocommerce-MyAccount-navigation ul li:last-child {
  border-bottom: none;
}
.woocommerce-MyAccount-navigation ul li a {
  display: block;
  padding: 0.85rem 1.25rem;
  color: #333;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.3s;
}
.woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-MyAccount-navigation ul li.is-active a {
  background: #E53935;
  color: #fff;
}

/* ---- WordPress search pagination ---- */
.nav-links {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.nav-links .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.5rem;
  border-radius: 9999px;
  font-family: 'Varela Round', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.3s;
  background: #fff;
  color: #333;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.nav-links .page-numbers:hover {
  background: #E53935;
  color: #fff;
}
.nav-links .page-numbers.current {
  background: #E53935;
  color: #fff;
}

/* ---- Prose (generic page content) ---- */
.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: 1.5rem; font-weight: 700; }
.prose h3 { font-size: 1.25rem; font-weight: 700; }
.prose p { line-height: 1.75; }
.prose ul { list-style-type: disc; padding-left: 1.5rem; }
.prose ol { list-style-type: decimal; padding-left: 1.5rem; }
.prose li { margin-top: 0.5em; }
.prose blockquote { border-left: 4px solid #E53935; padding-left: 1rem; font-style: italic; }
.prose img { border-radius: 1rem; }
.prose a { color: #E53935; }
.prose a:hover { text-decoration: underline; }

/* ---- Contact form styling ---- */
.kalinka-form-wrap input[type="text"],
.kalinka-form-wrap input[type="email"],
.kalinka-form-wrap input[type="tel"],
.kalinka-form-wrap input[type="url"],
.kalinka-form-wrap textarea,
.kalinka-form-wrap select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: rgba(245,241,232,0.3);
  color: #333;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  font-family: 'Open Sans', sans-serif;
}
.kalinka-form-wrap input:focus,
.kalinka-form-wrap textarea:focus,
.kalinka-form-wrap select:focus {
  border-color: #E53935;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}
.kalinka-form-wrap input[type="submit"],
.kalinka-form-wrap button[type="submit"] {
  background: #E53935;
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 0.75rem 2rem;
  font-family: 'Varela Round', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}
.kalinka-form-wrap input[type="submit"]:hover,
.kalinka-form-wrap button[type="submit"]:hover {
  background: #c62828;
}
