/*
Theme Name: Modern Mart
Theme URI: https://woomodern.com/modern-mart
Author: Woo Modern
Author URI: https://woomodern.com
Description: A modern, fully responsive WooCommerce theme with Flipkart/Nykaa/JioMart-style UI/UX. Built for Indian e-commerce websites with beautiful product displays, mega menus, and optimized checkout flows.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: modern-mart
Tags: e-commerce, woocommerce, responsive, modern, flipkart-style, nykaa-style

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
*/

/* ============================================
   CSS VARIABLES & RESET
   ============================================ */
:root {
  --primary: #2874f0;
  --primary-dark: #1a5dc8;
  --secondary: #fb641b;
  --secondary-dark: #e55a15;
  --accent: #ff9f00;
  --success: #388e3c;
  --danger: #ff4444;
  --warning: #ffc107;
  --info: #17a2b8;
  --dark: #212121;
  --gray-900: #263238;
  --gray-800: #37474f;
  --gray-700: #455a64;
  --gray-600: #546e7a;
  --gray-500: #78909c;
  --gray-400: #90a4ae;
  --gray-300: #b0bec5;
  --gray-200: #cfd8dc;
  --gray-100: #eceff1;
  --gray-50: #f5f5f5;
  --white: #ffffff;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Poppins', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl: 0 12px 48px rgba(0,0,0,0.15);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: all 0.3s ease;
  --container-max: 1340px;
  --header-height: 64px;
}

/* ============================================
   BASE RESET
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-primary);
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
}

.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 { width: 100%; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* Screen reader only */
.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;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
}

.btn-primary:hover {
  background: var(--secondary-dark);
  border-color: var(--secondary-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

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

.btn-sm {
  padding: 6px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  line-height: 1.4;
}

.badge-primary { background: var(--primary); color: var(--white); }
.badge-success { background: var(--success); color: var(--white); }
.badge-danger { background: var(--danger); color: var(--white); }
.badge-warning { background: var(--warning); color: var(--dark); }
.badge-accent { background: var(--accent); color: var(--dark); }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* ============================================
   SECTION STYLES
   ============================================ */
.section {
  padding: 40px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-100);
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  position: relative;
  padding-left: 16px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: var(--primary);
  border-radius: 2px;
}

.section-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
  padding: 12px 0;
  font-size: 13px;
  color: var(--gray-500);
}

.breadcrumbs a {
  color: var(--gray-600);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs span {
  margin: 0 8px;
  color: var(--gray-300);
}

.breadcrumbs .current {
  color: var(--gray-800);
  font-weight: 500;
}

/* ============================================
   PAGINATION
   ============================================ */
.mm-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.mm-pagination a,
.mm-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: var(--transition);
}

.mm-pagination a {
  background: var(--white);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.mm-pagination a:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.mm-pagination span.current {
  background: var(--primary);
  color: var(--white);
  border: 1px solid var(--primary);
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   FORM STYLES
   ============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--gray-700);
  font-size: 14px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: var(--transition);
  color: var(--gray-800);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(40, 116, 240, 0.15);
}

.form-control::placeholder {
  color: var(--gray-400);
}

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

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23546e7a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ============================================
   ALERTS / NOTICES
   ============================================ */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid var(--success);
}

.alert-error,
.alert-danger {
  background: #ffebee;
  color: #c62828;
  border-left: 4px solid var(--danger);
}

.alert-warning {
  background: #fff8e1;
  color: #f57f17;
  border-left: 4px solid var(--warning);
}

.alert-info {
  background: #e3f2fd;
  color: #1565c0;
  border-left: 4px solid var(--info);
}

/* ============================================
   STAR RATING
   ============================================ */
.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--accent);
  font-size: 14px;
}

.star-rating .star {
  color: var(--gray-300);
}

.star-rating .star.filled {
  color: var(--accent);
}

/* ============================================
   PRICE STYLES
   ============================================ */
.price {
  font-weight: 600;
  color: var(--gray-900);
}

.price .amount {
  font-size: 18px;
  font-weight: 700;
}

.price .original {
  font-size: 14px;
  color: var(--gray-500);
  text-decoration: line-through;
  margin-left: 8px;
  font-weight: 400;
}

.price .discount {
  font-size: 13px;
  color: var(--success);
  margin-left: 8px;
  font-weight: 600;
}

/* ============================================
   SKIP LINK (Accessibility)
   ============================================ */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--white);
  padding: 8px 16px;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}
