/*
Theme Name: SangiMart
Theme URI: http://example.com/SangiMart
Author: Antigravity
Author URI: http://example.com
Description: A highly optimized, Shopify-inspired WooCommerce theme with multiple landing page layouts.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.0
Text Domain: SangiMart
*/

:root {
  --primary-color: #2563eb; /* Blue accent */
  --secondary-color: #1e40af;
  --text-main: #1f2937;
  --text-light: #6b7280;
  --bg-main: #f3f4f6;
  --bg-card: #ffffff;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --header-bg: #ffffff;
  --header-text: #1f2937;
  --announcement-bg: #000000;
  --announcement-text: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--secondary-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Announcement Bar */
.announcement-bar {
  background-color: var(--announcement-bg);
  color: var(--announcement-text);
  text-align: center;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Header */
.site-header {
  background-color: var(--header-bg);
  color: var(--header-text);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
}

.site-branding h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
}

.site-branding a {
  color: var(--header-text);
}

.header-search form {
  display: flex;
  width: 100%;
  max-width: 400px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  overflow: hidden;
}

.header-search input[type="search"] {
  flex-grow: 1;
  padding: 10px 15px;
  border: none;
  outline: none;
  font-size: 15px;
}

.header-search button {
  background-color: var(--bg-main);
  border: none;
  padding: 0 15px;
  cursor: pointer;
  color: var(--text-light);
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-icon {
  color: var(--header-text);
  position: relative;
  font-size: 20px;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: var(--primary-color);
  color: white;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
}

/* Footer */
.site-footer {
  background-color: var(--header-bg);
  padding: 60px 0 30px;
  margin-top: 60px;
  border-top: 1px solid #e5e7eb;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-widget h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-widget ul {
  list-style: none;
}

.footer-widget ul li {
  margin-bottom: 10px;
}

.footer-widget ul li a {
  color: var(--text-light);
}

.footer-widget ul li a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #e5e7eb;
  color: var(--text-light);
  font-size: 14px;
}

.trust-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.trust-badge-icon {
  width: 40px;
  height: 25px;
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-light);
}

/* Utility */
.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background-color: var(--secondary-color);
  color: white;
}

.btn-block {
  display: block;
  width: 100%;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
}

/* Product Grids */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  border: 1px solid #e5e7eb;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.product-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background-color: #f9fafb;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--danger);
  color: white;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 4px;
}

.product-info {
  padding: 15px;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-main);
  margin-bottom: 15px;
}

.product-price del {
  color: var(--text-light);
  font-size: 14px;
  font-weight: normal;
  margin-right: 5px;
}

/* Single Product Page (Shopify Style) */
.single-product-container {
  display: flex;
  gap: 40px;
  padding: 40px 0;
  align-items: flex-start;
}

.product-gallery {
  flex: 1;
  position: sticky;
  top: 100px;
}

.product-main-image {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
  border: 1px solid #e5e7eb;
}

.product-thumbnails {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.product-thumbnail {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  cursor: pointer;
}

.product-details {
  flex: 1;
}

.product-details h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.2;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-light);
}

.stock-status {
  color: var(--danger);
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
}

.stock-bar-container {
  background-color: #e5e7eb;
  border-radius: 10px;
  height: 8px;
  margin: 10px 0 20px;
  overflow: hidden;
}

.stock-bar {
  background-color: var(--danger);
  height: 100%;
  width: 15%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.urgency-text {
  background-color: #fef2f2;
  color: var(--danger);
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #fca5a5;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.add-to-cart-form {
  margin-bottom: 30px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  width: max-content;
  margin-bottom: 20px;
}

.quantity-btn {
  background: none;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-main);
}

.quantity-input {
  width: 50px;
  text-align: center;
  border: none;
  border-left: 1px solid #d1d5db;
  border-right: 1px solid #d1d5db;
  font-size: 16px;
  padding: 10px 0;
}

.buy-now-btn {
  background-color: #000;
  margin-top: 10px;
}

.buy-now-btn:hover {
  background-color: #333;
}

.product-accordion {
  border-top: 1px solid #e5e7eb;
}

.accordion-item {
  border-bottom: 1px solid #e5e7eb;
}

.accordion-header {
  padding: 15px 0;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-content {
  padding-bottom: 15px;
  color: var(--text-light);
  display: none; /* In a real scenario, handled by JS */
}

/* Layout Specifics */
/* Layout 1: Classic Store */
.hero-classic {
  background-color: #111827;
  color: white;
  padding: 80px 0;
  text-align: center;
}

.hero-classic h2 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 20px;
}

.hero-classic p {
  font-size: 18px;
  color: #9ca3af;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: -30px;
  position: relative;
  z-index: 10;
}

.category-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .single-product-container {
    flex-direction: column;
  }
  
  .product-gallery {
    position: static;
  }
  
  .header-inner {
    flex-wrap: wrap;
  }
  
  .header-search {
    order: 3;
    width: 100%;
    margin-top: 15px;
    max-width: 100%;
  }

  /* Sticky Add to Cart for Mobile */
  .mobile-sticky-atc {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 999;
    display: flex;
    gap: 10px;
  }
}
