/* --- VARIABLES & RESET --- */
:root {
  --primary-color: #E30613;
  --secondary-color: #111111;
  --accent-color: #6B6B6B;
  --bg-color: #f5f5f5;
  --white: #ffffff;
  --border-color: #e0e0e0;
  --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--secondary-color);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* --- HEADER --- */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 15px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-toggle {
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
}

.logo img {
  height: 40px;
}

.header-icons {
  display: flex;
  gap: 20px;
  align-items: center;
}

.header-icons a, .header-icons button {
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
}

.cart-counter {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--primary-color);
  color: var(--white);
  font-size: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* --- SIDE CART --- */
.side-cart {
  position: fixed;
  top: 0;
  right: -400px;
  width: 350px;
  height: 100vh;
  background: var(--white);
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  z-index: 1001;
  display: flex;
  flex-direction: column;
}

.side-cart.open {
  right: 0;
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-items-wrapper {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
}

.btn-primary {
  display: block;
  width: 100%;
  background: var(--primary-color);
  color: var(--white);
  text-align: center;
  padding: 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin-bottom: 10px;
}

.btn-secondary {
  background: var(--secondary-color);
}

/* --- HOME PAGE --- */
.hero-banner {
  background: url('../images/hero-bg.jpg') center/cover;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
}

.section-title {
  text-align: center;
  margin: 40px 0 20px;
  font-size: 28px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.cat-card {
  background: var(--white);
  padding: 40px 20px;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

.cat-card:hover {
  transform: translateY(-5px);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  text-align: center;
  padding-bottom: 20px;
}

.product-card img {
  width: 100%;
  height: auto;
}

.sale-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary-color);
  color: var(--white);
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 4px;
}

.price {
  color: var(--primary-color);
  font-weight: bold;
  margin: 10px 0;
}

.add-to-cart-btn {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.3s;
}

.add-to-cart-btn:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* --- NEWSLETTER & FOOTER --- */
.newsletter {
  background: var(--white);
  padding: 50px 0;
  text-align: center;
  margin-top: 50px;
}

.newsletter input {
  padding: 10px;
  width: 300px;
  border: 1px solid var(--border-color);
  border-radius: 4px 0 0 4px;
}

.newsletter button {
  padding: 10px 20px;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.site-footer {
  background: var(--secondary-color);
  color: var(--white);
  padding: 40px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-grid h4 {
  margin-bottom: 15px;
  color: var(--primary-color);
}

.footer-grid ul li {
  margin-bottom: 10px;
}

.footer-grid a:hover {
  color: var(--primary-color);
}

/* --- PRODUCT DETAILS --- */
.product-details-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 40px auto;
}

.qty-selector {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
}

.qty-selector input {
  width: 60px;
  padding: 8px;
  text-align: center;
}

.action-buttons {
  display: flex;
  gap: 15px;
}

/* --- CART PAGE --- */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  margin-top: 20px;
}

.cart-table th, .cart-table td {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.cart-page-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin: 40px auto;
}

.order-summary {
  background: var(--white);
  padding: 20px;
  border-radius: 8px;
}