/*
Theme Name: HIHE Modern
Theme URI: https://yoursite.com
Author: HIHE Team
Author URI: https://yoursite.com
Description: Fast Fashion Fusion Wear - Modern mobile-first WordPress theme with React-inspired UI. WooCommerce compatible, Elementor ready.
Version: 2.0.0
Requires at least: 5.8
Tested up to: 6.4
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: hihe
Tags: e-commerce, woocommerce, fashion, mobile-first, modern

HIHE Modern - Fast Fashion Fusion Wear Theme
*/

/* ==================== CSS VARIABLES (Design System) ==================== */
:root {
  /* Colors - Light Mode */
  --background: 0 0% 100%;
  --foreground: 0 0% 0%;
  --primary: 0 0% 0%;
  --primary-foreground: 0 0% 100%;
  --secondary: 0 0% 96%;
  --secondary-foreground: 0 0% 0%;
  --muted: 0 0% 96%;
  --muted-foreground: 0 0% 45%;
  --accent: 352 82% 38%; /* HIHE Red #B11226 */
  --accent-foreground: 0 0% 100%;
  --border: 0 0% 90%;
  --input: 0 0% 90%;
  --ring: 0 0% 0%;
  
  /* Shadows */
  --shadow-subtle: 0 2px 8px hsl(0 0% 0% / 0.04);
  --shadow-card: 0 4px 24px hsl(0 0% 0% / 0.06);
  --shadow-hover: 0 8px 32px hsl(0 0% 0% / 0.1);
  
  /* Radii */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Dark mode */
.dark {
  --background: 0 0% 7%;
  --foreground: 0 0% 100%;
  --primary: 0 0% 100%;
  --primary-foreground: 0 0% 0%;
  --secondary: 0 0% 15%;
  --muted: 0 0% 15%;
  --muted-foreground: 0 0% 65%;
  --accent: 352 82% 45%;
  --border: 0 0% 20%;
  --input: 0 0% 20%;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  overflow-x: hidden;
  padding-bottom: 70px;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

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

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.5rem, 3vw, 1.875rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing);
  line-height: 1.7;
}

.text-sm { font-size: 0.875rem; line-height: 1.5; }
.text-xs { font-size: 0.75rem; line-height: 1.4; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

.font-heading { font-family: var(--font-heading); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ==================== LAYOUT ==================== */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}

.site-content {
  padding: 1.5rem 0 5rem;
  min-height: 60vh;
}

@media (min-width: 768px) {
  .site-content {
    padding: 2.5rem 0;
  }
  
  body {
    padding-bottom: 0;
  }
}

/* ==================== HEADER ==================== */
.top-strip {
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  text-align: center;
  padding: 0.625rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: hsl(var(--background) / 0.98);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
  transition: transform 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  gap: 1rem;
}

@media (min-width: 768px) {
  .header-inner {
    padding: 1.25rem 1.5rem;
  }
}

.site-logo a {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: hsl(var(--foreground));
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: hsl(var(--foreground));
  position: relative;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease;
}

.header-icon:hover {
  background: hsl(var(--muted));
}

.cart-count,
.wishlist-count {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  font-size: 0.625rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
}

/* ==================== NAVIGATION ==================== */
.main-navigation {
  display: none;
}

@media (min-width: 768px) {
  .main-navigation {
    display: block;
  }
  
  .main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
  }
  
  .main-navigation a {
    font-weight: 500;
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s ease;
  }
  
  .main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: hsl(var(--accent));
    transition: width 0.3s ease;
  }
  
  .main-navigation a:hover::after {
    width: 100%;
  }
}

/* Mobile Bottom Navigation */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: hsl(var(--background) / 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid hsl(var(--border));
  padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  box-shadow: 0 -2px 10px hsl(0 0% 0% / 0.05);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: none;
  border: none;
  color: hsl(var(--muted-foreground));
  font-size: 0.625rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.mobile-nav-item i,
.mobile-nav-item svg {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: hsl(var(--foreground));
}

.mobile-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: hsl(var(--accent));
  border-radius: 0 0 3px 3px;
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none;
  }
}

/* ==================== BUTTONS ==================== */
.button,
.wp-block-button__link,
button[type="submit"],
.woocommerce button.button,
.woocommerce a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  line-height: 1;
}

.button:hover,
.wp-block-button__link:hover,
button[type="submit"]:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover {
  background: hsl(var(--primary) / 0.9);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

.button-accent {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.button-accent:hover {
  background: hsl(var(--accent) / 0.9);
}

.button-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
}

.button-secondary:hover {
  background: hsl(var(--secondary) / 0.8);
}

.button-outline {
  background: transparent;
  border: 2px solid hsl(var(--border));
  color: hsl(var(--foreground));
}

.button-outline:hover {
  background: hsl(var(--muted));
  border-color: hsl(var(--foreground));
}

/* ==================== CARDS ==================== */
.card {
  background: hsl(var(--background));
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all 0.3s ease;
}

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

/* ==================== FORMS ==================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid hsl(var(--border));
  border-radius: var(--radius);
  font-size: 0.9375rem;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.1);
}

input::placeholder,
textarea::placeholder {
  color: hsl(var(--muted-foreground));
}

/* ==================== PRODUCT GRID ==================== */
.products,
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
  list-style: none;
}

@media (min-width: 640px) {
  .products,
  .woocommerce ul.products {
    gap: 1.5rem;
  }
}

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

@media (min-width: 1024px) {
  .products,
  .woocommerce ul.products {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

.product,
.woocommerce ul.products li.product {
  background: hsl(var(--background));
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-subtle);
}

.product:hover,
.woocommerce ul.products li.product:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.product-image,
.woocommerce ul.products li.product .product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: hsl(var(--muted));
}

.product-image img,
.woocommerce ul.products li.product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product:hover .product-image img,
.woocommerce ul.products li.product:hover img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  padding: 0.375rem 0.75rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}

.product-badge.sale {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.wishlist-button {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: hsl(var(--background));
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-card);
}

.wishlist-button:hover {
  transform: scale(1.1);
  background: hsl(var(--muted));
}

.wishlist-button.in-wishlist i {
  color: hsl(var(--accent));
}

.product-details {
  padding: 1rem;
}

.product-title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  font-family: var(--font-body);
}

.product-price,
.woocommerce ul.products li.product .price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.product-price del,
.woocommerce ul.products li.product .price del {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  font-weight: 400;
}

.product-price ins,
.woocommerce ul.products li.product .price ins {
  text-decoration: none;
}

.product-discount {
  font-size: 0.75rem;
  color: #16a34a;
  font-weight: 600;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.product-rating i {
  color: #fbbf24;
  font-size: 0.75rem;
}

/* ==================== FOOTER ==================== */
.site-footer {
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  padding: 3rem 0 calc(70px + 1.5rem);
  margin-top: 4rem;
}

@media (min-width: 768px) {
  .site-footer {
    padding: 3rem 0 1.5rem;
  }
}

.footer-widgets {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

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

.footer-widget h3 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  font-family: var(--font-body);
}

.footer-widget ul {
  list-style: none;
}

.footer-widget li {
  margin-bottom: 0.625rem;
}

.footer-widget a {
  font-size: 0.875rem;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.footer-widget a:hover {
  opacity: 1;
  color: hsl(var(--accent));
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.newsletter-form input {
  background: hsl(var(--background) / 0.1);
  border: 1px solid hsl(var(--background) / 0.2);
  color: hsl(var(--background));
}

.newsletter-form input::placeholder {
  color: hsl(var(--background) / 0.5);
}

.newsletter-form button {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid hsl(var(--background) / 0.1);
  font-size: 0.875rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.social-links a {
  font-size: 1.25rem;
  transition: all 0.2s ease;
  opacity: 0.8;
}

.social-links a:hover {
  opacity: 1;
  color: hsl(var(--accent));
  transform: translateY(-2px);
}

/* ==================== UTILITIES ==================== */
.text-center { text-align: center; }
.text-muted { color: hsl(var(--muted-foreground)); }
.bg-muted { background: hsl(var(--muted)); }
.bg-accent { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing); }
.p-3 { padding: var(--spacing-lg); }
.p-4 { padding: var(--spacing-xl); }

.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.shadow-card { box-shadow: var(--shadow-card); }

.grid { display: grid; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--spacing); }
.gap-4 { gap: var(--spacing-xl); }

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

/* Stagger animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* ==================== WOOCOMMERCE OVERRIDES ==================== */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid;
}

.woocommerce-message {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.woocommerce-error {
  background: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 767px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .container {
    padding: 0 1rem;
  }
}