/* ==================
   SHOP PAGE STYLES
   ================== */

.page-header {
  background: linear-gradient(135deg, #0a1128, #1c2541);
  color: white;
  text-align: center;
  padding: 50px 20px 30px 20px;
}

.page-header h1 {
  font-size: 2.1rem;
  margin-bottom: 6px;
}

.page-header p {
  font-size: 16px;
  color: #d4a373;
}

/* ==================
   MOBILE FILTER ROW
   ================== */
.mobile-filter-row {
  display: none;
}

@media (max-width: 800px) {
  .mobile-filter-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 8px;
    background: #fff;
    border-bottom: 1px solid #ededed;
    position: sticky;
    top: 0;
    z-index: 30;
  }
  
  .mobile-filter-row select,
  .mobile-filter-row input[type="range"],
  .mobile-filter-row button {
    font-size: 13px;
    padding: 7px 10px;
    border-radius: 7px;
    border: 1px solid #e5e7eb;
    background: #fafafc;
    white-space: nowrap;
    min-width: 90px;
  }
  
  .mobile-range {
    min-width: 80px;
    width: 80px !important;
  }
  
  #price-value-mobile {
    font-weight: 600;
    color: #a984bc;
    margin-left: 5px;
    white-space: nowrap;
  }
  
  #reset-mobile-filters {
    background: #d4a373;
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    padding: 7px 12px;
  }
}

/* ==================
   SHOP LAYOUT
   ================== */
.shop-section {
  padding: 30px 0;
}

.shop-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 40px;
}

/* Desktop: show sidebar */
@media (min-width: 801px) {
  .shop-sidebar {
    display: block;
  }
}

/* Mobile: hide sidebar */
@media (max-width: 800px) {
  .shop-sidebar {
    display: none;
  }
  .shop-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ==================
   SIDEBAR FILTERS
   ================== */
.shop-sidebar {
  background: #fff;
  padding: 18px;
  border-radius: 14px;
  box-shadow: 0 3px 15px rgba(168, 132, 188, 0.07);
  height: fit-content;
  position: sticky;
  top: 90px;
}

.filter-group {
  margin-bottom: 16px;
}

.filter-group h3 {
  font-size: 18px;
  color: #48416c;
  margin-bottom: 12px;
  font-weight: 600;
}

.filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.filter-list li {
  margin-bottom: 12px;
}

.filter-list label {
  font-size: 15px;
  color: #222;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.filter-list input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

.filter-list span {
  font-size: 13px;
  color: #a984bc;
  margin-left: auto;
}

.price-slider {
  width: 100%;
  margin-top: 8px;
}

#price-value {
  font-size: 15px;
  font-weight: bold;
  color: #d4a373;
  display: block;
  margin-top: 5px;
}

.sort-options {
  width: 100%;
  margin-top: 8px;
  font-size: 15px;
  padding: 8px;
  border-radius: 7px;
  border: 1px solid #e5e7eb;
  background: #fafafc;
  color: #222;
}

.btn-reset-filters {
  width: 100%;
  padding: 9px;
  margin-top: 12px;
  background: #d4a373;
  color: white;
  border: none;
  border-radius: 7px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-reset-filters:hover {
  background: #c08f5c;
}

/* ==================
   PRODUCTS GRID
   ================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 10px 0;
}

.product-card {
  background: #fff;
  border-radius: 13px;
  box-shadow: 0 2px 11px rgba(168, 132, 188, 0.08);
  padding: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(168, 132, 188, 0.15);
}

.product-card img {
  max-width: 90%;
  border-radius: 9px;
  margin-bottom: 10px;
  object-fit: cover;
  height: 200px;
}

.product-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #4a4173;
  margin: 10px 0 6px 0;
}

.product-price {
  font-size: 1rem;
  color: #a984bc;
  font-weight: bold;
  margin-bottom: 4px;
}

.product-qty {
  font-size: 0.99rem;
  color: #6b7280;
  margin-bottom: 8px;
}

.product-qty.low-stock {
  color: #d3664c;
  font-weight: bold;
}

.add-cart-btn {
  background: #d4a373;
  color: #fff;
  border: none;
  padding: 7px 18px;
  font-size: 0.92rem;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 7px;
  transition: background 0.3s;
  font-weight: 600;
}

.add-cart-btn:hover {
  background: #c08f5c;
}

/* ==================
   PAGINATION
   ================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 23px 0;
}

.page-btn {
  background: #f3e8ff;
  border-radius: 8px;
  border: 1px solid #e5e1eb;
  padding: 7px 12px;
  font-size: 1rem;
  color: #48416c;
  cursor: pointer;
  transition: all 0.3s;
}

.page-btn:hover {
  background: #e5d4ff;
}

.page-btn.active {
  background: #d4a373;
  color: white;
  border-color: #d4a373;
}
/* PRODUCT MODAL */
.product-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: linear-gradient(135deg, #fff7f6 0%, #fff5f8 100%);
  margin: 2% auto;
  max-width: 90%;
  max-height: 90%;
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  overflow: hidden;
  animation: modalSlideIn 0.4s ease-out;
  position: relative;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: scale(0.9) translateY(30px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 15px; right: 20px;
  font-size: 32px;
  color: #999;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s;
}

.modal-close:hover { color: #d4a373; }

.modal-body {
  padding: 60px 30px 30px;
  display: flex;
  gap: 25px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-image {
  max-width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(212,163,115,0.3);
}

.modal-info h2 {
  margin: 0 0 10px 0;
  font-size: 24px;
  color: #2d1b69;
  font-weight: 600;
}

.modal-price {
  font-size: 28px;
  font-weight: 700;
  color: #d4a373 !important;
  margin: 5px 0 20px 0;
}

.modal-details p {
  margin: 8px 0;
  font-size: 14px;
  color: #555;
}

.modal-details strong {
  color: #2d1b69;
  font-weight: 500;
}

.modal-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
  font-weight: 500;
}

.stock-info {
  color: #d4a373;
  font-weight: 600;
  margin: 10px 0;
}

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

.btn-add-cart, .btn-quick-buy {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 15px;
}

.btn-add-cart {
  background: linear-gradient(135deg, #d4a373, #b8946e);
  color: white;
}

.btn-add-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(212,163,115,0.4);
}

.btn-quick-buy {
  background: linear-gradient(135deg, #2d1b69, #1a0f3d);
  color: white;
}

.btn-quick-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(45,27,105,0.4);
}

/* Mobile Modal */
@media (max-width: 768px) {
  .modal-body {
    flex-direction: column;
    padding: 50px 20px 20px;
  }
  
  .modal-image {
    max-width: 100%;
    height: 250px;
  }
}

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

/* Tablet */
@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

/* Mobile */
@media (max-width: 800px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0;
  }
  .shop-sidebar {
    display: none;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .page-header {
    padding: 30px 15px 20px 15px;
  }
  .page-header h1 {
    font-size: 1.8rem;
  }
  .product-card {
    padding: 10px;
  }
  .product-card img {
    height: 150px;
  }
}

/* ==================
   NOTIFICATION
   ================== */
@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}
.modal-body {
  display: flex;
  gap: 20px;
}

.modal-left {
  flex: 1;
}

.modal-thumbs {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-thumb {
  width: 55px;
  height: 55px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
}

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

.modal-thumb.active {
  border-color: #d4a373;
}
