/* SHOP STYLES */

#shop-intro {
  text-align: center;
  padding: 60px 20px 40px;
}

#shop-intro h1 {
  font-size: 48px;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 12px;
  letter-spacing: -1px;
}

#shop-intro p {
  font-size: 18px;
  color: var(--light-gray);
  font-weight: 300;
}

/* Filtres */
#shop-filters {
  text-align: center;
  padding: 20px;
  margin-bottom: 40px;
}

.filter-container {
  display: inline-flex;
  gap: 12px;
  background: white;
  padding: 6px;
  border-radius: var(--border-radius-lg);
  border: 1px solid #e0e0e0;
}

.filter-btn {
  padding: 10px 24px;
  background: transparent;
  border: none;
  border-radius: var(--border-radius-lg);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  color: var(--text-dark);
}

.filter-btn:hover {
  background: #f5f5f5;
}

.filter-btn.active {
  background: var(--purple);
  color: white;
}

/* Grille produits */
#shop-products {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

.loading-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--light-gray);
}

/* Carte produit */
.product-card {
  background: white;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 1px solid #e0e0e0;
  transition: all var(--transition-speed) ease;
  cursor: pointer;
}

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

.product-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f5f5f5;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-speed) ease;
}

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

.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--yellow);
  color: var(--text-dark);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.product-info {
  padding: 20px;
}

.product-category {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--light-gray);
  margin-bottom: 8px;
  font-weight: 400;
}

.product-name {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.product-price {
  font-size: 20px;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 12px;
}

.product-stock {
  font-size: 13px;
  color: var(--light-gray);
  margin-bottom: 16px;
}

.product-stock.low {
  color: var(--yellow);
}

.product-stock.out {
  color: #e74c3c;
}

.btn-add-cart {
  width: 100%;
  padding: 12px;
  background: var(--yellow);
  color: var(--text-dark);
  border: none;
  border-radius: var(--border-radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.btn-add-cart:hover {
  background: #d4bd1f;
  transform: translateY(-2px);
}

.btn-add-cart:disabled {
  background: #e0e0e0;
  color: #999;
  cursor: not-allowed;
  transform: none;
}

/* Badge panier */
.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--yellow);
  color: var(--text-dark);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.cart-badge:empty {
  display: none;
}

#cart-icon {
  position: relative;
  display: inline-block;
}

/* Drawer panier */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  pointer-events: none;
  transition: all 0.3s ease;
}

.cart-drawer.open {
  pointer-events: all;
}

.cart-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cart-drawer.open .cart-overlay {
  opacity: 1;
}

.cart-content {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: white;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.cart-header {
  padding: 24px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h2 {
  font-size: 24px;
  font-weight: 500;
  color: var(--purple);
}

.cart-close {
  background: none;
  border: none;
  font-size: 32px;
  color: var(--light-gray);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.cart-close:hover {
  background: #f5f5f5;
  color: var(--text-dark);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--light-gray);
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 12px;
  background: #fafafa;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: white;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-name {
  font-weight: 500;
  color: var(--text-dark);
}

.cart-item-details {
  font-size: 13px;
  color: var(--light-gray);
}

.cart-item-price {
  font-weight: 600;
  color: var(--purple);
  margin-top: auto;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #e0e0e0;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

.qty-btn:hover {
  background: #f5f5f5;
}

.qty-value {
  min-width: 30px;
  text-align: center;
  font-weight: 500;
}

.cart-footer {
  padding: 24px;
  border-top: 1px solid #e0e0e0;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  margin-bottom: 16px;
}

.cart-total span:last-child {
  font-size: 24px;
  font-weight: 600;
  color: var(--purple);
}

.btn-checkout {
  width: 100%;
  padding: 16px;
  background: var(--yellow);
  color: var(--text-dark);
  border: none;
  border-radius: var(--border-radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.btn-checkout:hover {
  background: #d4bd1f;
  transform: translateY(-2px);
}

/* Modal produit */
.product-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.product-modal.open {
  display: flex;
}

.product-modal .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
}

.modal-product-content {
  position: relative;
  background: white;
  border-radius: var(--border-radius-md);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px;
}

.modal-images {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-main-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  background: #f5f5f5;
}

.modal-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-thumbnails {
  display: flex;
  gap: 8px;
}

.modal-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.modal-thumbnail.active {
  border-color: var(--yellow);
}

.modal-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-details h2 {
  font-size: 32px;
  font-weight: 500;
  color: var(--purple);
  margin-bottom: 8px;
}

.modal-category {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--light-gray);
  margin-bottom: 16px;
}

.modal-price {
  font-size: 28px;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 20px;
}

.modal-description {
  line-height: 1.6;
  color: var(--text-dark);
  margin-bottom: 24px;
}

.modal-sizes {
  margin-bottom: 24px;
}

.modal-sizes h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
}

.size-options {
  display: flex;
  gap: 8px;
}

.size-option {
  padding: 10px 16px;
  border: 1px solid #e0e0e0;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  transition: all 0.2s ease;
}

.size-option:hover {
  border-color: var(--purple);
}

.size-option.selected {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
}

.modal-quantity {
  margin-bottom: 24px;
}

.modal-quantity h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.btn-modal-cart {
  flex: 1;
  padding: 16px;
  background: var(--yellow);
  color: var(--text-dark);
  border: none;
  border-radius: var(--border-radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.btn-modal-cart:hover {
  background: #d4bd1f;
}

/* Responsive */
@media (max-width: 1200px) {
  #shop-intro h1 {
    font-size: 42px;
  }

  #shop-intro p {
    font-size: 16px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
  }

  #shop-products {
    padding: 0 30px 70px;
  }

  .cart-content {
    max-width: 400px;
  }

  .modal-product-content {
    gap: 32px;
    padding: 36px;
  }

  .modal-details h2 {
    font-size: 28px;
  }

  .modal-price {
    font-size: 24px;
  }
}

@media (max-width: 992px) {
  #shop-intro {
    padding: 50px 20px 30px;
  }

  #shop-intro h1 {
    font-size: 38px;
  }

  #shop-intro p {
    font-size: 15px;
  }

  .filter-container {
    gap: 10px;
  }

  .filter-btn {
    padding: 9px 20px;
    font-size: 13px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
  }

  #shop-products {
    padding: 0 25px 60px;
  }

  .product-name {
    font-size: 17px;
  }

  .product-price {
    font-size: 19px;
  }

  .cart-content {
    max-width: 380px;
  }

  .cart-header {
    padding: 20px;
  }

  .cart-header h2 {
    font-size: 22px;
  }

  .cart-items {
    padding: 20px;
  }

  .cart-item {
    padding: 14px;
  }

  .cart-item-image {
    width: 70px;
    height: 70px;
  }

  .modal-product-content {
    gap: 28px;
    padding: 32px;
  }

  .modal-details h2 {
    font-size: 26px;
  }

  .modal-price {
    font-size: 22px;
  }
}

@media (max-width: 768px) {
  #shop-intro {
    padding: 40px 15px 25px;
  }

  #shop-intro h1 {
    font-size: 32px;
  }

  #shop-intro p {
    font-size: 14px;
  }

  #shop-filters {
    padding: 15px;
    margin-bottom: 30px;
  }

  .filter-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 8px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  #shop-products {
    padding: 0 15px 50px;
  }

  .product-info {
    padding: 16px;
  }

  .product-name {
    font-size: 15px;
  }

  .product-price {
    font-size: 17px;
  }

  .btn-add-cart {
    padding: 10px;
    font-size: 13px;
  }

  .cart-content {
    max-width: 100%;
  }

  .cart-header {
    padding: 18px;
  }

  .cart-header h2 {
    font-size: 20px;
  }

  .cart-close {
    font-size: 28px;
    width: 36px;
    height: 36px;
  }

  .cart-items {
    padding: 18px;
  }

  .cart-item {
    padding: 12px;
    gap: 12px;
  }

  .cart-item-image {
    width: 60px;
    height: 60px;
  }

  .cart-item-name {
    font-size: 14px;
  }

  .cart-item-details {
    font-size: 12px;
  }

  .cart-footer {
    padding: 18px;
  }

  .cart-total {
    font-size: 16px;
  }

  .cart-total span:last-child {
    font-size: 20px;
  }

  .btn-checkout {
    padding: 14px;
    font-size: 15px;
  }

  .modal-product-content {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 24px;
  }

  .modal-details h2 {
    font-size: 24px;
  }

  .modal-price {
    font-size: 20px;
  }

  .modal-thumbnails {
    gap: 6px;
  }

  .modal-thumbnail {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  #shop-intro {
    padding: 30px 10px 20px;
  }

  #shop-intro h1 {
    font-size: 26px;
    letter-spacing: -0.5px;
  }

  #shop-intro p {
    font-size: 13px;
  }

  #shop-filters {
    padding: 12px 10px;
    margin-bottom: 25px;
  }

  .filter-container {
    gap: 6px;
    padding: 6px;
  }

  .filter-btn {
    padding: 7px 14px;
    font-size: 11px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  #shop-products {
    padding: 0 10px 40px;
  }

  .product-card {
    border-radius: 12px;
  }

  .product-badge {
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    font-size: 10px;
    border-radius: 16px;
  }

  .product-info {
    padding: 12px;
  }

  .product-category {
    font-size: 10px;
    margin-bottom: 6px;
  }

  .product-name {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .product-price {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .product-stock {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .btn-add-cart {
    padding: 8px;
    font-size: 12px;
    border-radius: 8px;
  }

  .cart-badge {
    width: 18px;
    height: 18px;
    font-size: 10px;
    top: -6px;
    right: -6px;
  }

  .cart-content {
    max-width: 100%;
  }

  .cart-header {
    padding: 16px;
  }

  .cart-header h2 {
    font-size: 18px;
  }

  .cart-close {
    font-size: 24px;
    width: 32px;
    height: 32px;
  }

  .cart-items {
    padding: 16px;
  }

  .cart-empty {
    padding: 40px 15px;
    font-size: 14px;
  }

  .cart-item {
    padding: 10px;
    gap: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
  }

  .cart-item-image {
    width: 50px;
    height: 50px;
    border-radius: 6px;
  }

  .cart-item-name {
    font-size: 13px;
  }

  .cart-item-details {
    font-size: 11px;
  }

  .cart-item-price {
    font-size: 14px;
  }

  .qty-btn {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }

  .qty-value {
    min-width: 25px;
    font-size: 13px;
  }

  .cart-footer {
    padding: 16px;
  }

  .cart-total {
    font-size: 14px;
    margin-bottom: 14px;
  }

  .cart-total span:last-child {
    font-size: 18px;
  }

  .btn-checkout {
    padding: 12px;
    font-size: 14px;
  }

  .modal-product-content {
    padding: 20px;
    gap: 20px;
    border-radius: 16px;
  }

  .modal-images {
    gap: 10px;
  }

  .modal-main-image {
    border-radius: 10px;
  }

  .modal-thumbnails {
    gap: 5px;
  }

  .modal-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 6px;
  }

  .modal-details h2 {
    font-size: 20px;
    margin-bottom: 6px;
  }

  .modal-category {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .modal-price {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .modal-description {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
  }

  .modal-sizes {
    margin-bottom: 20px;
  }

  .modal-sizes h3 {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .size-options {
    gap: 6px;
    flex-wrap: wrap;
  }

  .size-option {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 6px;
  }

  .modal-quantity {
    margin-bottom: 20px;
  }

  .modal-quantity h3 {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .modal-actions {
    gap: 10px;
  }

  .btn-modal-cart {
    padding: 14px;
    font-size: 14px;
    border-radius: 10px;
  }
}
