/* ==========================================
   GLOBAL RESET & BASE STYLES
   ========================================== */

/* Reset box model and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

/* Base typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
  color: #666;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  border: 1px solid #ddd;
  padding: 0.75rem;
  border-radius: 4px;
}

/* Container for main content */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Section spacing */
.section {
  padding: 3rem 0;
}

.section--small {
  padding: 2rem 0;
}

/* ==========================================
   ANNOUNCEMENT BAR
   ========================================== */

.announcement-bar {
  background-color: #f8f9fa;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
}

.announcement-bar__text {
  color: #495057;
}

/* ==========================================
   HEADER / NAVBAR
   ========================================== */

.header {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.navbar__logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #222;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar__link {
  color: #666;
  font-weight: 500;
  transition: color 0.2s ease;
}

.navbar__link:hover {
  color: #222;
}

.navbar__cart {
  position: relative;
}

.navbar__cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #dc3545;
  color: white;
  font-size: 0.75rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile menu toggle */
.navbar__toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.navbar__toggle-line {
  width: 25px;
  height: 3px;
  background-color: #333;
  margin: 3px 0;
  transition: 0.3s;
}

/* ==========================================
   PRODUCT PAGE LAYOUT
   ========================================== */

.product-page {
  padding: 2rem 0;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* Product image styling */
.product-detail__image {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/*
Recommended Image Size:
Desktop: 600x600 (1:1)
Mobile: 1000x1000
Background: light / neutral
*/

/* Product information */
.product-detail__info h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #222;
}

.product-detail__price {
  font-size: 1.5rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 1rem;
}

.product-detail__description {
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* Size selection */
.size-selector {
  margin-bottom: 2rem;
}

.size-selector__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

.size-selector__options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.size-option {
  width: 50px;
  height: 50px;
  border: 2px solid #ddd;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  color: #666;
}

.size-option:hover {
  border-color: #007bff;
  color: #007bff;
}

.size-option--selected {
  border-color: #007bff;
  background-color: #007bff;
  color: white;
}

/* Quantity input */
.quantity-selector {
  margin-bottom: 2rem;
}

.quantity-selector__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

.quantity-input {
  width: 80px;
  text-align: center;
  padding: 0.75rem;
  border: 2px solid #ddd;
  border-radius: 4px;
}

/* Add to cart button */
.add-to-cart-btn {
  width: 100%;
  padding: 1rem 2rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.add-to-cart-btn:hover {
  background-color: #0056b3;
}

/* ==========================================
   SHOP PRODUCT GRID
   ========================================== */

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.product-card {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
  background-color: #fff;
}

.product-card:hover {
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.product-card__image {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
}

/*
Recommended Image Size:
Desktop: 400x400 (1:1)
Mobile: 600x600
Background: light / neutral
*/

.product-card__content {
  padding: 1.5rem;
}

.product-card__name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #222;
}

.product-card__price {
  font-size: 1.2rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 1rem;
}

.product-card__link {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  text-align: center;
  font-weight: 500;
  transition: all 0.2s ease;
}

.product-card__link:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

/* ==========================================
   CART PAGE LAYOUT
   ========================================== */

.cart-page {
  padding: 2rem 0;
}

.cart-items {
  margin-bottom: 2rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid #e9ecef;
}

.cart-item__image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
}

/*
Recommended Image Size:
Desktop: 100x100 (1:1)
Mobile: 80x80
Background: light / neutral
*/

.cart-item__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cart-item__name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #222;
}

.cart-item__size {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.cart-item__price {
  font-weight: 600;
  color: #222;
}

.cart-item__controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.5rem;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #ddd;
  background-color: #f8f9fa;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.quantity-value {
  min-width: 40px;
  text-align: center;
}

.remove-btn {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
}

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

.cart-summary {
  background-color: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.cart-summary__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #222;
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cart-summary__total {
  display: flex;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1rem 0;
  padding-top: 1rem;
  border-top: 2px solid #dee2e6;
}

.checkout-btn {
  width: 100%;
  padding: 1rem 2rem;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

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

/* ==========================================
   CHECKOUT FORM LAYOUT
   ========================================== */

.checkout-page {
  padding: 2rem 0;
}

.checkout-form {
  max-width: 600px;
  margin: 0 auto;
}

.checkout-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background-color: #fff;
}

.checkout-section__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #222;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

.form-group__input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.checkout-summary {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.checkout-summary__item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.checkout-summary__total {
  display: flex;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid #dee2e6;
}

.place-order-btn {
  width: 100%;
  padding: 1rem 2rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-top: 1rem;
}

.place-order-btn:hover {
  background-color: #0056b3;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
  background-color: #222;
  color: #fff;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

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

.footer__section h3 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer__nav {
  list-style: none;
}

.footer__nav li {
  margin-bottom: 0.5rem;
}

.footer__nav a {
  color: #ccc;
  transition: color 0.2s ease;
}

.footer__nav a:hover {
  color: #fff;
}

.footer__copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #444;
  color: #999;
  font-size: 0.9rem;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Tablet styles */
@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .navbar__nav {
    gap: 1rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .cart-item {
    grid-template-columns: 80px 1fr auto;
  }
  
  .cart-item__image {
    width: 80px;
    height: 80px;
  }
}

/* Mobile styles */
@media (max-width: 480px) {
  .navbar {
    padding: 0.75rem 0;
  }
  
  .navbar__nav {
    display: none;
  }
  
  .navbar__toggle {
    display: flex;
  }
  
  .shop-grid {
    grid-template-columns: 1fr;
  }
  
  .product-card__content {
    padding: 1rem;
  }
  
  .cart-item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .cart-item__controls {
    align-items: stretch;
  }
  
  .quantity-control {
    justify-content: space-between;
  }
  
  .checkout-section {
    padding: 1rem;
  }
}