/*
Theme Name:  BagShop
Theme URI:   https://mnbags.com
Author:      MN Bags
Author URI:  https://mnbags.com
Description: A modern, sporty e-commerce WordPress theme for school bags, luggage, backpacks and travel bags. Includes repair service booking. WooCommerce compatible.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bagshop
Tags:        e-commerce, woocommerce, responsive, mobile-first, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, sticky-post, threaded-comments, translation-ready
*/

/* =============================================================================
   CSS CUSTOM PROPERTIES (Variables)
   ============================================================================= */

:root {
  /* ── Primary Brand Colors ── */
  --primary:            #000000;
  --primary-dark:       #000000;
  --primary-light:      #333333;

  /* ── Accent: Charcoal ── */
  --accent-cyan:        #1a1a1a;
  --accent-cyan-dark:   #000000;
  --accent-cyan-light:  rgba(26, 26, 26, 0.15);

  /* ── Accent: Black ── */
  --accent-gold:      #000000;
  --accent-gold-dark: #000000;
  --accent-gold-light:rgba(0, 0, 0, 0.12);

  /* ── Neutral / Background ── */
  --white:              #ffffff;
  --light-bg:           #f0f4f8;
  --gray-bg:            #f8f9fa;
  --gray-mid:           #e8ecef;
  --border:             #e0e0e0;
  --border-light:       #f0f0f0;

  /* ── Text ── */
  --text-dark:          #000000;
  --text-medium:        #4a4a4a;
  --text-light:         #999999;
  --text-muted:         #b0b8c1;

  /* ── Status ── */
  --sale:               #000000;
  --success:            #28a745;
  --success-light:      rgba(40, 167, 69, 0.12);
  --warning:            #ffc107;
  --warning-light:      rgba(255, 193, 7, 0.15);
  --info:               #1a1a1a;
  --danger:             #dc3545;

  /* ── Typography ── */
  --font-heading:       'Poppins', sans-serif;
  --font-body:          'Inter', sans-serif;

  --text-xs:            12px;
  --text-sm:            14px;
  --text-base:          16px;
  --text-md:            18px;
  --text-lg:            20px;
  --text-xl:            24px;
  --text-2xl:           28px;
  --text-3xl:           34px;

  --weight-regular:     400;
  --weight-medium:      500;
  --weight-semibold:    600;
  --weight-bold:        700;
  --weight-extrabold:   800;

  --leading-tight:      1.2;
  --leading-snug:       1.45;
  --leading-normal:     1.65;  /* SEO: minimum 1.6 for body text readability */
  --leading-relaxed:    1.8;

  /* ── Spacing Scale ── */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-8:   32px;
  --space-10:  40px;
  --space-12:  48px;
  --space-16:  64px;
  --space-20:  80px;
  --space-24:  96px;

  /* ── Border Radius ── */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-xs:  0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-sm:  0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md:  0 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-lg:  0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl:  0 16px 48px rgba(0, 0, 0, 0.15);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 8px 28px rgba(0, 0, 0, 0.14);

  /* ── Transitions ── */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* ── Layout ── */
  --container-max:     1280px;
  --container-pad:     16px;
  --header-height:     72px;
  --topbar-height:     38px;
  --nav-height:        calc(var(--header-height) + var(--topbar-height));

  /* ── Z-index Scale ── */
  --z-dropdown:  100;
  --z-sticky:    200;
  --z-overlay:   300;
  --z-modal:     400;
  --z-toast:     500;
  --z-tooltip:   600;

  /* ── Gray Scale (used by page templates) ── */
  --gray-50:     #f9fafb;
  --gray-100:    #f3f4f6;
  --gray-200:    #e5e7eb;
  --gray-300:    #d1d5db;
  --gray-400:    #9ca3af;
  --gray-500:    #6b7280;
  --gray-600:    #4b5563;
  --gray-700:    #374151;
  --gray-800:    #1f2937;
  --gray-900:    #111827;
}

/* =============================================================================
   RESET & BASE
   ============================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--text-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--text-medium);
  background-color: #f8fafc;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Screen-reader skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--accent-cyan);
  color: var(--primary);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-md);
  text-decoration: none;
  z-index: var(--z-toast);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--text-dark);
}

h1 { font-size: clamp(28px, 5vw, 48px); font-weight: 900; } /* SEO: H1 visually dominant */
h2 { font-size: clamp(22px, 3vw, 34px); font-weight: 800; } /* SEO: H2 clearly below H1 */
h3 { font-size: var(--text-md);  }
h4 { font-size: var(--text-base); font-weight: var(--weight-medium); }
h5 { font-size: var(--text-sm);  font-weight: var(--weight-medium); }
h6 { font-size: var(--text-xs);  font-weight: var(--weight-medium); }

p {
  margin-bottom: var(--space-4);
  line-height: var(--leading-normal);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #1a1a1a;
}

a:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: var(--font-body);
  font-size: var(--text-base);
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Flex helpers */
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-col    { display: flex; flex-direction: column; }
.gap-1  { gap: var(--space-1); }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }

/* Grid helpers */
.grid { display: grid; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }

/* Text */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-primary { color: var(--primary); }
.text-cyan    { color: var(--accent-cyan); }
.text-orange  { color: var(--accent-gold); }
.text-white   { color: var(--white); }
.text-muted   { color: var(--text-light); }
.text-sm      { font-size: var(--text-sm); }
.text-xs      { font-size: var(--text-xs); }
.fw-medium    { font-weight: var(--weight-medium); }
.fw-semibold  { font-weight: var(--weight-semibold); }
.fw-bold      { font-weight: var(--weight-bold); }

/* Visibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden { display: none !important; }

/* Spacing helpers */
.mt-auto { margin-top: auto; }
.mb-0    { margin-bottom: 0; }
.section-gap { padding-block: var(--space-12); }

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base),
              transform var(--transition-fast),
              box-shadow var(--transition-base);
  min-height: 44px; /* a11y tap target */
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

/* Primary (Orange CTA) */
.btn-primary {
  background-color: var(--accent-gold);
  color: var(--white);
  border-color: var(--accent-gold);
}

.btn-primary:hover {
  background-color: var(--accent-gold-dark);
  border-color: var(--accent-gold-dark);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* Secondary (Cyan) */
.btn-secondary {
  background-color: var(--accent-cyan);
  color: var(--primary);
  border-color: var(--accent-cyan);
}

.btn-secondary:hover {
  background-color: var(--accent-cyan-dark);
  border-color: var(--accent-cyan-dark);
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(26, 26, 26, 0.35);
}

/* Outline Primary */
.btn-outline {
  background-color: transparent;
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.btn-outline:hover {
  background-color: var(--accent-gold);
  color: var(--white);
}

/* Outline White (for dark backgrounds) */
.btn-outline-white {
  background-color: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline-white:hover {
  background-color: var(--white);
  color: var(--primary);
}

/* Ghost (Nav links etc.) */
.btn-ghost {
  background-color: transparent;
  color: var(--text-medium);
  border-color: transparent;
  padding-inline: var(--space-3);
}

.btn-ghost:hover {
  background-color: var(--light-bg);
  color: var(--text-dark);
}

/* Sizes */
.btn-sm {
  padding: 8px var(--space-4);
  font-size: var(--text-sm);
  min-height: 36px;
}

.btn-lg {
  padding: 16px var(--space-8);
  font-size: var(--text-md);
  min-height: 52px;
  border-radius: var(--radius-lg);
}

/* Icon-only button */
.btn-icon {
  padding: 10px;
  border-radius: var(--radius-full);
  min-height: 44px;
  min-width: 44px;
}

/* =============================================================================
   BADGES & LABELS
   ============================================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 3px var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  line-height: 1;
}

.badge-orange  { background-color: var(--accent-gold);  color: var(--white); }
.badge-cyan    { background-color: var(--accent-cyan);    color: var(--primary); }
.badge-navy    { background-color: var(--primary);        color: var(--white); }
.badge-white   { background-color: var(--white);          color: var(--accent-gold); }
.badge-success { background-color: var(--success);        color: var(--white); }
.badge-warning { background-color: var(--warning);        color: var(--text-dark); }

/* Product card badges */
.product-badge-sale { background-color: var(--accent-gold); color: var(--white); }
.product-badge-new  { background-color: var(--accent-cyan);   color: var(--primary); }
.product-badge-hot  { background-color: var(--danger);        color: var(--white); }

/* =============================================================================
   FORMS (Base)
   ============================================================================= */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-dark);
}

.form-label span.required {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 12px var(--space-4);
  font-size: var(--text-base);
  color: var(--text-dark);
  background-color: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 44px;
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-light);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:invalid:not(:placeholder-shown) {
  border-color: var(--danger);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

select.form-control {
  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='%234a4a4a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* =============================================================================
   SECTION HEADERS (Reusable)
   ============================================================================= */

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  gap: var(--space-4);
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--text-dark);
  line-height: var(--leading-tight);
}

.section-title span {
  color: var(--accent-cyan);
}

.section-subtitle {
  font-size: var(--text-sm);
  color: var(--text-light);
  margin-top: var(--space-1);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--accent-gold);
  white-space: nowrap;
  flex-shrink: 0;
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.section-link:hover {
  color: var(--accent-gold-dark);
  gap: var(--space-2);
}

/* =============================================================================
   CARDS (Base)
   ============================================================================= */

.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

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

.card-body {
  padding: var(--space-5);
}

/* =============================================================================
   STAR RATINGS
   ============================================================================= */

.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--warning);
  font-size: var(--text-sm);
}

.star-rating .star-count {
  color: var(--text-light);
  font-size: var(--text-xs);
  margin-left: var(--space-1);
}

/* =============================================================================
   LOADING STATES
   ============================================================================= */

.skeleton {
  background: linear-gradient(90deg, var(--gray-mid) 25%, var(--border-light) 50%, var(--gray-mid) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =============================================================================
   PRICE DISPLAY
   ============================================================================= */

.price-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.price-current {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--accent-gold);
}

.price-original {
  font-size: var(--text-sm);
  color: var(--text-light);
  text-decoration: line-through;
}

.price-discount {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--success);
  background-color: var(--success-light);
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

/* =============================================================================
   RESPONSIVE TYPOGRAPHY (Desktop overrides — mobile-first)
   ============================================================================= */

@media (min-width: 768px) {
  h1 { font-size: var(--text-3xl); }    /* 32px */
  h2 { font-size: var(--text-2xl); }    /* 26px */
  h3 { font-size: var(--text-lg); }     /* 20px */

  .section-title { font-size: var(--text-2xl); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .container { --container-pad: 24px; }
}

@media (min-width: 1024px) {
  .container { --container-pad: 32px; }
  .section-gap { padding-block: var(--space-20); }
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
  .no-print,
  .site-header,
  .site-footer,
  .mobile-nav-bottom { display: none !important; }

  body { font-size: 12pt; color: #000; }
  a    { color: #000; text-decoration: underline; }
}

/* =============================================================================
   COMPREHENSIVE DESIGN PASS — style.css  (July 2026)
   ============================================================================= */

/* ── 1. CSS VARIABLE ADDITIONS ── */
:root {
    /* Orange as #1a1a1a (warmer, friendlier than #000000 pure-red-orange) */
    --accent-gold:       #1a1a1a;
    --accent-gold-dark:  #e05a00;
    --accent-gold-light: rgba(26, 26, 26, 0.1);

    /* Primary button gradient */
    --btn-primary-bg:  linear-gradient(135deg,#1a1a1a,#000000);

    /* Card defaults */
    --shadow-card:       0 2px 12px rgba(0, 0, 0, 0.07);
    --shadow-card-hover: 0 8px 28px rgba(0, 0, 0, 0.14);
}

/* ── 2. HEADINGS — stronger weight ── */
h1, h2, h3 {
    font-weight: var(--weight-extrabold); /* 800 */
}
h4, h5, h6 {
    font-weight: var(--weight-semibold);
}

/* ── 3. LINKS — orange on hover ── */
a:hover {
    color: var(--accent-gold);
}

/* ── 4. FORM FOCUS — orange ring ── */
.form-control:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.12);
}

/* ── 5. SECTION TITLE — bigger on desktop ── */
@media (min-width: 1024px) {
    .section-title {
        font-size: var(--text-2xl); /* 26px */
    }
}

/* ── 6. SECTION TITLE span — orange accent ── */
.section-title span {
    color: var(--accent-gold);
}

/* ── 7. CARD — improved shadow values ── */
.card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    border-radius: var(--radius-lg);
}
.card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
    transform: translateY(-3px);
}

/* ── 8. BADGE — sale badge orange ── */
.badge-orange { background: linear-gradient(135deg,#1a1a1a,#000000); }
.product-badge-sale { background: linear-gradient(135deg,#1a1a1a,#000000); }

/* ── 9. BODY — slightly darker text for better contrast ── */
body {
    color: #333;
}

/* ── 10. SECTION GAPS — consistent ── */
.section-gap { padding-block: 64px; }
@media (max-width: 768px) {
    .section-gap { padding-block: 44px; }
}

/* ── 11. IMAGES — ensure consistent aspect handling ── */
.product-card img,
.mn-card__img,
.hp-cat-card__img {
    object-fit: cover;
    display: block;
}

/* ── 12. FOCUS VISIBLE — better accessibility ring ── */
*:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ── 13. SKIP LINK — visible when focused ── */
.skip-link:focus {
    background: var(--accent-gold);
    color: #fff;
}

/* ── 14. BLOCKQUOTES ── */
blockquote {
    border-left: 4px solid var(--accent-gold);
    padding: 12px 20px;
    background: rgba(26, 26, 26, 0.04);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-medium);
    margin: 16px 0;
}

/* ── 15. HORIZONTAL RULE ── */
hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin-block: var(--space-8);
}

/* ── 16. PRINT — hide decorative elements ── */
@media print {
    .whatsapp-float,
    .mobile-nav-bottom,
    .mobile-menu-overlay,
    .header__hamburger,
    .hero-slider__dots,
    .hero-slider__arrow { display: none !important; }
}
