/* =======================
   GLOBAL RESET + BASE
   ======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: Arial, Helvetica, sans-serif;
  background: #000;
  color: #fff;
  height: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* =======================
   HEADER
   ======================= */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.8);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-left .logo {
  height: 40px;
}

.header-center .page-title {
  font-size: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
}

.cart-link {
  font-weight: bold;
  position: relative;
}

.cart-badge {
  background: #e53935;
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  position: absolute;
  top: -10px;
  right: -20px;
}

/* =======================
   GRID (SHOP + COLLECTIONS)
   ======================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.card {
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.card-img-wrap {
  background: #222;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-body {
  padding: 1rem;
  text-align: center;
}

.card-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.card-price {
  font-weight: bold;
  color: #e53935;
}

/* Pagination */
.pagination {
  text-align: center;
  padding: 1rem;
}

.pagination a {
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  background: #222;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.pagination a.active,
.pagination a:hover {
  background: #e53935;
  color: #fff;
}

/* =======================
   PRODUCT DETAIL
   ======================= */
.product-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem;
  justify-content: center;
  align-items: flex-start;
}

.product-gallery {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.gallery-img {
  display: none;
  border-radius: 10px;
}

.gallery-img.active {
  display: block;
}

.gallery-controls {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
}

.gallery-controls button {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 5px;
}

.product-info {
  flex: 1;
  max-width: 400px;
}

.product-name {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.product-price {
  font-size: 1.3rem;
  color: #e53935;
  margin-bottom: 1rem;
}

.product-desc {
  margin-bottom: 1.5rem;
  color: #ddd;
}

.size-buttons {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
}

.size-buttons .size {
  background: #222;
  border: 1px solid #444;
  color: #fff;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 5px;
}

.size-buttons .size:hover {
  background: #e53935;
}

.actions .btn-add-cart {
  background: #e53935;
  color: #fff;
  border: none;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.actions .btn-add-cart:hover {
  background: #b71c1c;
}

/* =======================
   CART + CHECKOUT
   ======================= */
.cart-section,
.checkout-section {
  padding: 2rem;
}

.cart-item,
.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  margin-bottom: 1rem;
  background: #111;
  border-radius: 8px;
}

.cart-total,
.checkout-total {
  font-size: 1.3rem;
  font-weight: bold;
  text-align: right;
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: #e53935;
  color: #fff;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.btn:hover {
  background: #b71c1c;
}

/* =======================
   THANK YOU PAGE
   ======================= */
.thankyou-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  position: relative;
  padding: 2rem;
  text-align: center;
}

.thankyou-box {
  background: rgba(0, 0, 0, 0.85);
  padding: 3rem 2rem;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  z-index: 2;
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.6);
}

.thankyou-box h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #e53935;
}

.thankyou-box p {
  margin: 0.5rem 0;
  color: #ddd;
}

.thankyou-box .btn {
  margin-top: 1.5rem;
  font-weight: bold;
}

/* =======================
   RESPONSIVE
   ======================= */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .product-detail {
    flex-direction: column;
    align-items: center;
  }

  .product-gallery,
  .product-info {
    max-width: 100%;
  }
}
