/*
Theme Name: RM Online Shop - WooCommerce
Theme URI: https://rmonlineshopbd.com
Description: Professional e-commerce WordPress theme with WooCommerce integration, optimized for Bangladesh online shopping
Version: 1.0.0
Author: RM Online Shop
Author URI: https://rmonlineshopbd.com
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rm-shop-woo
Domain Path: /languages
Requires at least: 5.0
Requires PHP: 7.4
Requires Plugins: woocommerce
*/

/* ============================================================================
   RM Online Shop - WooCommerce Theme
   ============================================================================ */

:root {
  --primary-color: #10b981;
  --primary-dark: #059669;
  --primary-light: #d1fae5;
  --accent-color: #f59e0b;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --border-color: #e5e7eb;
  --bg-light: #f9fafb;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
}

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

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

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-dark);
  background-color: #ffffff;
  line-height: 1.6;
}

/* ============================================================================
   Typography
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

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

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

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

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

/* ============================================================================
   Container & Layout
   ============================================================================ */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

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

/* ============================================================================
   Header & Navigation
   ============================================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.site-logo img {
  height: 2.5rem;
  width: auto;
}

.main-nav {
  display: none;
  gap: 2rem;
  align-items: center;
}

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

.main-nav a {
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-form {
  display: none;
  flex: 1;
  max-width: 300px;
}

@media (min-width: 1024px) {
  .search-form {
    display: flex;
  }
}

.search-form input {
  width: 100%;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-family: inherit;
}

.search-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.cart-icon, .wishlist-icon {
  position: relative;
  cursor: pointer;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.cart-icon:hover, .wishlist-icon:hover {
  color: var(--primary-color);
}

.badge {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ============================================================================
   Hero Section
   ============================================================================ */

.hero {
  position: relative;
  height: 500px;
  background: linear-gradient(to right, rgba(16, 185, 129, 0.1), rgba(245, 158, 11, 0.1));
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  max-width: 600px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: white;
}

.hero p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

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

.btn-secondary:hover {
  background-color: var(--primary-light);
}

/* ============================================================================
   Sections
   ============================================================================ */

.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.promo-banner {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 0;
}

.promo-banner-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  text-align: center;
}

.promo-item {
  font-weight: 600;
}

/* ============================================================================
   Products Grid
   ============================================================================ */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

@media (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* ============================================================================
   Product Card
   ============================================================================ */

.product-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.product-image {
  position: relative;
  height: 200px;
  background-color: var(--bg-light);
  overflow: hidden;
}

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

.product-card:hover .product-image img {
  transform: scale(1.1);
}

.product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background-color: var(--error);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.product-wishlist {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background-color: white;
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-wishlist:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.product-info {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  color: var(--text-dark);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.product-rating .stars {
  color: #fbbf24;
}

.product-rating .count {
  color: var(--text-light);
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.product-price-current {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

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

.product-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.product-actions button {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  background-color: white;
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.product-actions button:first-child {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.product-actions button:first-child:hover {
  background-color: var(--primary-dark);
}

.product-actions button:last-child:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* ============================================================================
   Categories
   ============================================================================ */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.category-card {
  position: relative;
  height: 200px;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-card:hover img {
  transform: scale(1.1);
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

.category-card:hover::before {
  background-color: rgba(0, 0, 0, 0.4);
}

.category-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
}

.category-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.category-count {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* ============================================================================
   Footer
   ============================================================================ */

.site-footer {
  background-color: var(--text-dark);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: white;
  margin-bottom: 1rem;
}

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

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================================================
   WooCommerce Overrides
   ============================================================================ */

.woocommerce-notice,
.woocommerce-error,
.woocommerce-message {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.375rem;
}

.woocommerce-notice {
  background-color: #dbeafe;
  color: #1e40af;
  border-left: 4px solid #3b82f6;
}

.woocommerce-error {
  background-color: #fee2e2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

.woocommerce-message {
  background-color: #dcfce7;
  color: #166534;
  border-left: 4px solid #10b981;
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .hero {
    height: 300px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}
