/* public/css/shop.css */

/* =========================================
   1. GLOBAL & VARIABLES
   ========================================= */
:root {
  --black: #111;
  --gray: #777;
  --muted: #7a7a7a;
  --light-gray: #f8f8f8;
  --border: #e5e5e5;
  --card-radius: 8px;
  --font-sans: 'Inter', 'Helvetica Neue', Arial, 'Prompt', sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background: #fff;
  color: var(--black);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;

  /* Sticky Footer Logic */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main,
.product-container,
.cart-container,
.checkout-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  flex: 1;
  /* Pushes footer down */
}

/* =========================================
   2. SHOP HERO & HEADERS
   ========================================= */
.hero-banner {
  position: relative;
  height: 50vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 60px;
}

.hero-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(80%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
}

.hero-title {
  font-weight: 400;
  letter-spacing: 0.1em;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.hero-sub {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 50px;
  text-align: center;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

/* =========================================
   3. FILTERS
   ========================================= */
.filters {
  display: flex;
  gap: 24px;
  margin-top: 20px;
}

.filter-btn {
  text-decoration: none;
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  font-size: 0.9rem;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--black);
  border-bottom-color: var(--black);
}

/* =========================================
   4. PRODUCT CARDS (Grid View)
   ========================================= */
.product-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease;
}

.product-card:hover {
  transform: translateY(-2px);
}

.image-container {
  position: relative;
  background: #fff;
  border-radius: var(--card-radius);
  overflow: hidden;
  margin-bottom: 14px;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(17, 17, 17, 0.05);
  box-shadow: 0 8px 20px rgba(17, 17, 17, 0.05);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  background: #fff;
  transition: transform 0.6s ease;
}

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

.product-info {
  text-align: left;
}

.product-name {
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
  color: var(--black);

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 400;
}

/* Badges & Icons */
.badge-label {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #fff;
  padding: 4px 10px;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  z-index: 5;
}

.add-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10;
}

.add-btn:hover {
  background: var(--black);
  color: #fff;
  transform: scale(1.1);
}

.wish-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  text-decoration: none;
  z-index: 10;
  transition: transform 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}

.wish-btn:hover {
  transform: scale(1.1);
  color: #EF8354;
}

.wish-btn i.bi-heart-fill {
  color: #EF8354;
}

/* =========================================
   5. PRODUCT DETAIL PAGE
   ========================================= */
.product-container {
  padding: 40px 20px 100px;
}

.breadcrumb-nav {
  padding: 20px 0;
  font-size: 0.85rem;
  color: var(--gray);
}

.breadcrumb-nav a {
  text-decoration: none;
  color: var(--gray);
  text-transform: uppercase;
}

.breadcrumb-nav a:hover {
  color: var(--black);
}

.detail-image-wrapper {
  background: var(--light-gray);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1 / 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-details-content {
  /* Renamed to avoid conflict with grid class */
  padding-left: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.product-category {
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--gray);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.detail-title {
  font-size: 2.5rem;
  font-weight: 400;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.detail-price {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 2rem;
  color: var(--black);
}

.detail-description {
  color: var(--gray);
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.action-group {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.quantity-input {
  width: 60px;
  padding: 12px;
  text-align: center;
  border: 1px solid var(--border);
  font-family: var(--font-sans);
}

.add-cart-btn {
  background: var(--black);
  color: #fff;
  border: 1px solid var(--black);
  padding: 12px 40px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  flex-grow: 1;
  max-width: 300px;
  text-decoration: none;
  text-align: center;
  display: inline-block;
}

.add-cart-btn:hover {
  background: #fff;
  color: var(--black);
}

/* =========================================
   6. CART PAGE
   ========================================= */
.cart-container {
  margin: 80px auto 40px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.cart-header {
  font-size: 1.75rem;
  text-transform: uppercase;
  margin-bottom: 40px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th {
  text-align: left;
  padding: 15px 0;
  color: #777;
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  border-bottom: 1px solid #eee;
}

.cart-table td {
  padding: 20px 0;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

.item-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cart-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  background: #f8f8f8;
}

.total-section {
  display: flex;
  justify-content: flex-end;
  margin-top: 40px;
}

.checkout-box {
  width: 300px;
  text-align: right;
}

.subtotal {
  font-size: 1.25rem;
  margin-bottom: 20px;
  font-weight: 500;
}

.btn-checkout {
  background: #111;
  color: #fff;
  width: 100%;
  padding: 15px;
  text-transform: uppercase;
  border: none;
  font-weight: 500;
  text-decoration: none;
  display: block;
  text-align: center;
}

.btn-checkout:hover {
  background: #333;
  color: #fff;
}

.empty-cart {
  text-align: center;
  padding: 60px 0;
  color: #777;
  margin: auto;
}

/* =========================================
   7. CHECKOUT PAGE
   ========================================= */
.checkout-container {
  margin: 60px auto;
  padding: 20px;
}

.page-title {
  font-size: 1.8rem;
  margin-bottom: 30px;
  text-transform: uppercase;
  font-weight: 400;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
}

.form-section {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.form-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #555;
  margin-bottom: 5px;
  display: block;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.form-control:focus {
  border-color: #111;
  outline: none;
}

.order-summary {
  background: #fff;
  border: 1px solid #eee;
  padding: 25px;
  border-radius: 8px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.total-row {
  border-top: 1px solid #ddd;
  margin-top: 15px;
  padding-top: 15px;
  font-weight: 700;
  font-size: 1.1rem;
}

.btn-place-order {
  background: #111;
  color: #fff;
  width: 100%;
  padding: 15px;
  text-transform: uppercase;
  border: none;
  margin-top: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-place-order:hover {
  background: #333;
}

/* =========================================
   8. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {

  /* Hero */
  .hero-banner {
    height: 40vh;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  /* Product Detail */
  .product-details-content {
    padding-left: 0;
    margin-top: 2rem;
  }

  .detail-title {
    font-size: 2rem;
  }

  /* Checkout */
  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .order-summary {
    order: -1;
    position: static;
    margin-bottom: 20px;
  }

  /* Grid Buttons */
  .add-btn {
    width: 38px;
    height: 38px;
    bottom: 12px;
    right: 12px;
  }
}

.pagination-custom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  /* Space between buttons */
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid transparent;
  /* Optional separator */
}

/* Style the links inside the pagination nav */
.pagination-custom .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* Sizing */
  min-width: 40px;
  height: 40px;
  padding: 0 14px;

  /* Typography */
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;

  /* Borders */
  border-radius: 4px;
  /* Matches your card radius */
  transition: all 0.2s ease;
}

/* 1. Default State (Inactive Pages) */
.pagination-custom .btn-outline-dark {
  color: var(--black);
  background-color: transparent;
  border: 1px solid var(--border);
  /* Light gray border */
}

.pagination-custom .btn-outline-dark:hover {
  background-color: var(--light-gray);
  border-color: var(--black);
  color: var(--black);
}

/* 2. Active State (Current Page) */
.pagination-custom .btn-dark {
  background-color: var(--black);
  color: #fff;
  border: 1px solid var(--black);
}

.pagination-custom .btn-dark:hover {
  background-color: #333;
  /* Slightly lighter black on hover */
  border-color: #333;
}

/* Mobile Tweak */
@media (max-width: 576px) {
  .pagination-custom .btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 0.8rem;
  }
}

.btn-remove {
  background: none;
  border: none;
  color: #ff4444;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0 10px;
}

.btn-remove:hover {
  color: #cc0000;
}
