/*
Theme Name: ALLSHOPER
Theme URI: https://example.com/allshoper
Author: ALLSHOPER
Author URI: https://example.com
Description: A modern, mobile-first WooCommerce theme for ALLSHOPER — a UAE kitchen & home products store. Clean product grid, hero slider, Cash on Delivery focused checkout flow, and WhatsApp contact built in.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: allshoper
Tags: e-commerce, woocommerce, custom-menu, featured-images, translation-ready
*/

/* ==========================================================
   ALLSHOPER — Design tokens
   Change these variables to re-theme the whole store.
   ========================================================== */
:root {
  --allshoper-brand: #0e5f52;
  --allshoper-brand-dark: #0a463d;
  --allshoper-accent: #e0a63a;
  --allshoper-accent-dark: #c58f2b;
  --allshoper-text: #1c211f;
  --allshoper-text-muted: #6b7570;
  --allshoper-bg: #ffffff;
  --allshoper-bg-soft: #f4f6f5;
  --allshoper-border: #e2e6e3;
  --allshoper-price: #0e5f52;
  --allshoper-old-price: #9aa39e;
  --allshoper-sale: #c0392b;
  --allshoper-radius: 12px;
  --allshoper-radius-sm: 8px;
  --allshoper-shadow: 0 2px 10px rgba(20, 30, 27, 0.06);
  --allshoper-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ==========================================================
   Base / reset
   ========================================================== */
* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--allshoper-font);
  color: var(--allshoper-text);
  background: var(--allshoper-bg);
  line-height: 1.5;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.allshoper-section-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.allshoper-content-area {
  max-width: 840px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}

.allshoper-content-area h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.allshoper-content-area .entry-content {
  font-size: 15.5px;
  line-height: 1.7;
}

.allshoper-content-area .entry-content p {
  margin: 0 0 18px;
}

.allshoper-post-meta {
  font-size: 13px;
  color: var(--allshoper-text-muted);
  margin: 0 0 24px;
}

.allshoper-post-list article {
  border-bottom: 1px solid var(--allshoper-border);
  padding: 24px 0;
}

.allshoper-post-list h2 {
  font-size: 20px;
  margin: 0 0 8px;
}

.allshoper-post-list h2 a:hover {
  color: var(--allshoper-brand);
}

.allshoper-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.allshoper-pagination a,
.allshoper-pagination span {
  padding: 8px 14px;
  border: 1px solid var(--allshoper-border);
  border-radius: var(--allshoper-radius-sm);
  font-size: 13.5px;
  font-weight: 600;
}

.allshoper-pagination .current {
  background: var(--allshoper-brand);
  color: #fff;
  border-color: var(--allshoper-brand);
}

/* ==========================================================
   Skip link (accessibility)
   ========================================================== */
.allshoper-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--allshoper-brand);
  color: #fff;
  padding: 12px 18px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}

.allshoper-skip-link:focus {
  left: 0;
}

/* ==========================================================
   1. Announcement bar
   ========================================================== */
.allshoper-announce {
  background: var(--allshoper-brand-dark);
  color: #fff;
  padding: 8px 16px;
}

.allshoper-announce-text {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
}

.allshoper-announce-divider {
  opacity: 0.5;
}

@media (max-width: 480px) {
  .allshoper-announce-divider {
    display: none;
  }
  .allshoper-announce-text {
    flex-direction: column;
    gap: 2px;
  }
}

/* ==========================================================
   2. Header
   ========================================================== */
.allshoper-header {
  background: var(--allshoper-bg);
  border-bottom: 1px solid var(--allshoper-border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.allshoper-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.allshoper-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 19px;
  color: var(--allshoper-brand);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.allshoper-logo img {
  max-height: 34px;
  width: auto;
}

.allshoper-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--allshoper-brand);
  color: #fff;
  font-size: 16px;
}

.allshoper-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.allshoper-nav ul {
  display: flex;
  align-items: center;
  gap: 26px;
}

.allshoper-nav a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--allshoper-text);
  opacity: 0.85;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.allshoper-nav a:hover {
  opacity: 1;
  color: var(--allshoper-brand);
}

.allshoper-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.allshoper-icon-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--allshoper-radius-sm);
  border: 1px solid var(--allshoper-border);
  color: var(--allshoper-text);
  transition: background 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.allshoper-cart-btn:hover {
  border-color: var(--allshoper-brand);
  color: var(--allshoper-brand);
}

.allshoper-cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--allshoper-sale);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.allshoper-whatsapp-btn {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

.allshoper-whatsapp-btn:hover {
  background: #1ebc59;
}

.allshoper-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--allshoper-radius-sm);
  border: 1px solid var(--allshoper-border);
  background: transparent;
  color: var(--allshoper-text);
}

.allshoper-mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--allshoper-border);
  padding: 6px 20px 12px;
}

.allshoper-mobile-nav.is-open {
  display: flex;
}

.allshoper-mobile-nav ul {
  display: flex;
  flex-direction: column;
}

.allshoper-mobile-nav a {
  display: block;
  padding: 11px 4px;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid var(--allshoper-border);
}

.allshoper-mobile-nav li:last-child a {
  border-bottom: none;
}

@media (max-width: 860px) {
  .allshoper-nav {
    display: none;
  }
  .allshoper-icon-btn-label {
    display: none;
  }
  .allshoper-icon-btn {
    padding: 8px;
  }
  .allshoper-menu-toggle {
    display: flex;
  }
}

/* ==========================================================
   3. Hero slider
   ========================================================== */
.allshoper-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--allshoper-bg-soft);
  touch-action: pan-y;
}

.allshoper-hero-track {
  position: relative;
  width: 100%;
  height: 360px;
}

.allshoper-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
}

.allshoper-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.allshoper-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.allshoper-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 20, 17, 0.65) 0%, rgba(10, 20, 17, 0.25) 55%, rgba(10, 20, 17, 0.05) 100%);
}

.allshoper-slide-content {
  position: absolute;
  left: 6%;
  top: 50%;
  transform: translateY(-50%);
  max-width: 480px;
  color: #fff;
}

.allshoper-slide-label {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.allshoper-slide-headline {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.allshoper-btn {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 12px 26px;
  border-radius: var(--allshoper-radius-sm);
  transition: transform 0.15s ease, background 0.15s ease;
}

.allshoper-btn-primary {
  background: var(--allshoper-accent);
  color: #1c1c1c;
}

.allshoper-btn-primary:hover {
  background: var(--allshoper-accent-dark);
  transform: translateY(-1px);
}

.allshoper-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1c1c1c;
  z-index: 5;
  transition: background 0.15s ease;
}

.allshoper-hero-arrow:hover {
  background: #fff;
}

.allshoper-hero-prev {
  left: 14px;
}

.allshoper-hero-next {
  right: 14px;
}

.allshoper-hero-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.allshoper-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.55);
  padding: 0;
  transition: background 0.15s ease, width 0.15s ease;
}

.allshoper-hero-dot.is-active {
  background: #fff;
  width: 22px;
  border-radius: 4px;
}

@media (max-width: 767px) {
  .allshoper-hero-track {
    height: 420px;
  }
  .allshoper-slide-overlay {
    background: linear-gradient(180deg, rgba(10, 20, 17, 0.25) 0%, rgba(10, 20, 17, 0.75) 100%);
  }
  .allshoper-slide-content {
    left: 6%;
    right: 6%;
    top: auto;
    bottom: 46px;
    transform: none;
    max-width: none;
  }
  .allshoper-slide-headline {
    font-size: 24px;
  }
  .allshoper-hero-arrow {
    width: 32px;
    height: 32px;
  }
}

/* ==========================================================
   4. Product collection / grid (home + shop archive)
   ========================================================== */
.allshoper-collection {
  padding: 52px 0 8px;
}

.allshoper-section-title {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.allshoper-section-subtitle {
  text-align: center;
  color: var(--allshoper-text-muted);
  font-size: 14.5px;
  margin: 0 0 32px;
}

.allshoper-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-bottom: 44px;
}

.allshoper-product-card {
  background: var(--allshoper-bg);
  border: 1px solid var(--allshoper-border);
  border-radius: var(--allshoper-radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.allshoper-product-card:hover {
  box-shadow: var(--allshoper-shadow);
  transform: translateY(-2px);
}

.allshoper-product-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--allshoper-bg-soft);
  overflow: hidden;
}

.allshoper-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.allshoper-product-card:hover .allshoper-product-image {
  transform: scale(1.04);
}

.allshoper-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--allshoper-sale);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 4px 9px;
  border-radius: 999px;
  z-index: 2;
}

.allshoper-product-body {
  padding: 14px 14px 16px;
}

.allshoper-product-title {
  font-size: 14.5px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.35;
  min-height: 2.7em;
}

.allshoper-product-title a:hover {
  color: var(--allshoper-brand);
}

.allshoper-product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 12px;
}

.allshoper-product-price {
  color: var(--allshoper-price);
  font-weight: 800;
  font-size: 16.5px;
}

.allshoper-product-old-price {
  color: var(--allshoper-old-price);
  font-size: 13px;
  text-decoration: line-through;
}

.allshoper-product-price-row del {
  color: var(--allshoper-old-price);
  font-size: 13px;
  text-decoration: line-through;
  margin-right: 6px;
}

.allshoper-product-price-row ins {
  text-decoration: none;
  color: var(--allshoper-price);
  font-weight: 800;
  font-size: 16.5px;
}

.allshoper-order-button {
  display: block;
  text-align: center;
  width: 100%;
  background: var(--allshoper-brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 11px 10px;
  border: none;
  border-radius: var(--allshoper-radius-sm);
  transition: background 0.15s ease;
}

.allshoper-order-button:hover {
  background: var(--allshoper-brand-dark);
  color: #fff;
}

@media (max-width: 1024px) and (min-width: 768px) {
  .allshoper-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .allshoper-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .allshoper-product-title {
    font-size: 13px;
    min-height: 2.6em;
  }
  .allshoper-product-price,
  .allshoper-product-price-row ins {
    font-size: 15px;
  }
  .allshoper-order-button {
    font-size: 11.5px;
    padding: 10px 6px;
  }
}

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

/* ==========================================================
   4b. Shop archive extras (filters / results count)
   ========================================================== */
.allshoper-shop-header {
  text-align: center;
  padding: 40px 0 8px;
}

.allshoper-shop-results {
  text-align: center;
  color: var(--allshoper-text-muted);
  font-size: 13.5px;
  margin: 0 0 24px;
}

/* ==========================================================
   4c. Single product page
   ========================================================== */
.allshoper-single-product {
  padding: 40px 0 64px;
}

.allshoper-single-product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: flex-start;
}

.allshoper-single-product-gallery img {
  border-radius: var(--allshoper-radius);
  border: 1px solid var(--allshoper-border);
}

.allshoper-single-product-title {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.allshoper-single-product-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 22px;
}

.allshoper-single-product-price ins {
  text-decoration: none;
  color: var(--allshoper-price);
  font-weight: 800;
}

.allshoper-single-product-price del {
  color: var(--allshoper-old-price);
  font-size: 16px;
}

.allshoper-single-product-desc {
  font-size: 14.5px;
  color: var(--allshoper-text);
  line-height: 1.7;
  margin: 0 0 26px;
}

.allshoper-single-product-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 26px;
  padding: 16px 18px;
  background: var(--allshoper-bg-soft);
  border-radius: var(--allshoper-radius);
  font-size: 13.5px;
}

.allshoper-single-order-button {
  display: inline-block;
  background: var(--allshoper-brand);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 32px;
  border: none;
  border-radius: var(--allshoper-radius-sm);
  letter-spacing: 0.02em;
}

.allshoper-single-order-button:hover {
  background: var(--allshoper-brand-dark);
  color: #fff;
}

@media (max-width: 860px) {
  .allshoper-single-product-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ==========================================================
   5. Why shop with us
   ========================================================== */
.allshoper-why {
  background: var(--allshoper-bg-soft);
  padding: 48px 0;
  margin-top: 12px;
}

.allshoper-why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.allshoper-why-card {
  background: var(--allshoper-bg);
  border: 1px solid var(--allshoper-border);
  border-radius: var(--allshoper-radius);
  padding: 26px 18px;
  text-align: center;
}

.allshoper-why-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 10px;
}

.allshoper-why-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
}

.allshoper-why-text {
  font-size: 13.5px;
  color: var(--allshoper-text-muted);
  margin: 0;
}

@media (max-width: 767px) {
  .allshoper-why-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .allshoper-why-card {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
  }
  .allshoper-why-icon {
    margin-bottom: 0;
    font-size: 26px;
  }
}

/* ==========================================================
   6. Footer
   ========================================================== */
.allshoper-footer {
  background: #10201b;
  color: #d9e3df;
  padding: 44px 0 0;
  margin-top: 12px;
}

.allshoper-footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.allshoper-footer-logo {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.allshoper-footer-tagline {
  font-size: 13.5px;
  color: #9fb0aa;
  margin: 6px 0 14px;
}

.allshoper-footer-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #67e39a;
}

.allshoper-footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.allshoper-footer-link {
  font-size: 13.5px;
  color: #c3d0cb;
  transition: color 0.15s ease;
}

.allshoper-footer-link:hover {
  color: #fff;
}

.allshoper-footer-bottom {
  text-align: center;
  padding: 18px 20px;
  font-size: 12px;
  color: #7f9089;
}

@media (max-width: 600px) {
  .allshoper-footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px 18px;
  }
}

/* ==========================================================
   Sidebar (optional — only appears once widgets are added)
   ========================================================== */
.allshoper-content-area.allshoper-has-sidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

.allshoper-sidebar {
  border: 1px solid var(--allshoper-border);
  border-radius: var(--allshoper-radius);
  padding: 20px;
}

.allshoper-widget + .allshoper-widget {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--allshoper-border);
}

.allshoper-widget-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
}

@media (max-width: 860px) {
  .allshoper-content-area.allshoper-has-sidebar {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   Footer — contact list + social icons
   ========================================================== */
.allshoper-footer-contact {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #b7c4bf;
}

.allshoper-footer-contact a {
  color: #b7c4bf;
}

.allshoper-footer-contact a:hover {
  color: #fff;
}

.allshoper-footer-logo-img img {
  max-height: 34px;
  width: auto;
}

.allshoper-footer-social {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.allshoper-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background 0.15s ease;
}

.allshoper-social-icon:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ==========================================================
   Currency dual display + misc small bits
   ========================================================== */
.allshoper-currency-code {
  font-size: 0.7em;
  font-weight: 700;
  opacity: 0.75;
  letter-spacing: 0.03em;
}

.allshoper-notice {
  text-align: center;
  color: var(--allshoper-text-muted);
  font-size: 14px;
  padding: 30px 20px;
  border: 1px dashed var(--allshoper-border);
  border-radius: var(--allshoper-radius);
}

.allshoper-slide-subheading {
  font-size: 15px;
  margin: -10px 0 18px;
  opacity: 0.9;
}

/* Dynamic "Why Shop With Us" column counts (2–6 cards) */
.allshoper-why-grid-1,
.allshoper-why-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.allshoper-why-grid-4,
.allshoper-why-grid-5,
.allshoper-why-grid-6 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 767px) {
  .allshoper-why-grid-1,
  .allshoper-why-grid-2,
  .allshoper-why-grid-4,
  .allshoper-why-grid-5,
  .allshoper-why-grid-6 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   Checkout — hidden email field (kept in the DOM, visually hidden,
   since some plugins still expect the field to exist)
   ========================================================== */
.allshoper-field-hidden,
p.form-row.allshoper-field-hidden,
#billing_email_field {
  display: none !important;
}

.woocommerce-checkout .validate-required label .required {
  color: var(--allshoper-sale);
}

/* ==========================================================
   404 page
   ========================================================== */
.allshoper-404 {
  text-align: center;
}

.allshoper-404 p {
  color: var(--allshoper-text-muted);
}

/* ==========================================================
   Reduced motion
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
