/* ==========================================================================
   shrinkwraps.co.uk - Components CSS (Hero, Product Cards, Cart Drawer)
   ========================================================================== */

/* Hero Slider */
.hero-section {
  padding: 1.5rem 0;
}

.hero-slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 420px;
  background-color: #1e293b;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  padding: 0 4rem;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.3) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 580px;
  color: #ffffff;
}

.hero-subtitle {
  color: var(--primary-color);
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  display: inline-block;
  background: rgba(121, 169, 57, 0.15);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.hero-title {
  font-size: 2.75rem;
  color: #ffffff;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.hero-description {
  font-size: 1.05rem;
  color: #cbd5e1;
  margin-bottom: 2rem;
}

.hero-slider-nav {
  position: absolute;
  bottom: 20px;
  right: 40px;
  z-index: 10;
  display: flex;
  gap: 0.5rem;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
}

.slider-dot.active {
  background-color: var(--primary-color);
  width: 30px;
  border-radius: 10px;
}

/* Category Grid Cards */
.categories-section {
  padding: 3rem 0;
}

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

.category-card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.category-thumb {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 3px solid var(--body-bg);
}

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

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

.category-card h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.category-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Product Tabs Section */
.products-section {
  padding: 3rem 0;
}

.tabs-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  border-bottom: 2px solid var(--border-color);
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-muted);
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
}

.tab-btn:hover,
.tab-btn.active {
  color: var(--primary-color);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--primary-color);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.75rem;
}

.product-card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
}

.product-thumb {
  position: relative;
  padding-top: 80%;
  overflow: hidden;
  background-color: #f8fafc;
}

.product-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-thumb img {
  transform: scale(1.08);
}

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

.product-cat {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.product-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7rem;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #f59e0b;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.rating-count {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: 0.25rem;
}

.product-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.product-price {
  display: flex;
  flex-direction: column;
}

.price-current {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-dark);
}

.price-original {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.add-cart-btn {
  background-color: rgba(121, 169, 57, 0.12);
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.add-cart-btn:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  transform: scale(1.05);
}

/* Promo Banners Grid */
.promo-section {
  padding: 2rem 0;
}

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

.promo-banner {
  height: 240px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  padding: 2.5rem;
  color: #ffffff;
}

.promo-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.2) 100%);
}

.promo-content {
  position: relative;
  z-index: 2;
  max-width: 300px;
}

.promo-content h3 {
  color: #ffffff;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.promo-content p {
  color: #cbd5e1;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* Slide-Over Cart Drawer */
.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.cart-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background-color: #ffffff;
  z-index: 2001;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--header-bg);
  color: #ffffff;
}

.drawer-header h3 {
  color: #ffffff;
  font-size: 1.1rem;
}

.close-drawer-btn {
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.drawer-cart-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.drawer-item-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.drawer-item-info {
  flex: 1;
}

.drawer-item-title {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-dark);
}

.drawer-item-price {
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: 700;
}

.drawer-item-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.drawer-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--border-color);
  background-color: #f8fafc;
}

.drawer-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: var(--text-dark);
}

.drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (max-width: 576px) {
  .hero-slide { padding: 0 1.5rem; }
  .hero-title { font-size: 1.85rem; }
  .promo-grid { grid-template-columns: 1fr; }
}
