/* ============================================================
   LYLA JEWELRY - REUSABLE COMPONENTS
   Product cards, buttons, collection items, cart items
   ============================================================ */

/* ==================== MEDIA QUERY BREAKPOINTS ====================
   Mobile:        max-width: 480px
   Large Mobile:  481px - 767px  
   Tablet:        768px - 1024px
   Desktop:       1025px - 1439px
   Large Desktop: 1440px+
   ============================================================ */

/* ==================== PRODUCT CARD (RING CARD) ==================== */




/* ==================== COLLECTION ITEMS (EARRING STACKING) ==================== */

/* Desktop (default) */
.earring-flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-md);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-lg);
}

.collection-item {
  flex: 0 0 calc(25% - 15px);
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.collection-item:hover {
  transform: scale(1.02);
}

.item-visual-box {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  margin-bottom: 12px;
}

.item-visual-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-info-stack {
  text-align: center;
}

.item-label {
  font-size: 14px;
  font-weight: var(--font-weight-book);
  margin-bottom: 4px;
}

.item-value {
  font-size: var(--font-size-small);
  opacity: 0.7;
}

/* Tablet: 768px - 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  .earring-flex-container {
    gap: var(--gap-md);
    padding: var(--spacing-lg);
  }
  
  .collection-item {
    flex: 0 0 calc(33.333% - 14px);
  }
  
  .item-visual-box {
    margin-bottom: 12px;
  }
  
  .item-label {
    font-size: 14px;
  }
  
  .item-value {
    font-size: var(--font-size-small);
  }
}

/* Large Mobile: 481px - 767px */
@media (min-width: 481px) and (max-width: 767px) {
  .earring-flex-container {
    gap: var(--gap-sm);
    padding: var(--spacing-md);
  }
  
  .collection-item {
    flex: 0 0 calc(50% - 10px);
  }
  
  .item-visual-box {
    margin-bottom: 10px;
  }
  
  .item-label {
    font-size: 13px;
  }
  
  .item-value {
    font-size: 12px;
  }
}

/* Mobile: <=480px */
@media (max-width: 480px) {
  .earring-flex-container {
    gap: var(--gap-sm);
    padding: var(--spacing-md);
  }
  
  .collection-item {
    flex: 0 0 calc(50% - 10px);
  }
  
  .item-visual-box {
    margin-bottom: 10px;
  }
  
  .item-label {
    font-size: 13px;
  }
  
  .item-value {
    font-size: 12px;
  }
}

/* Large Desktop: 1440px+ */
@media (min-width: 1440px) {
  .earring-flex-container {
    gap: var(--gap-xl);
    padding: var(--spacing-2xl);
    max-width: 1600px;
  }
  
  .collection-item {
    flex: 0 0 calc(25% - 30px);
  }
  
  .item-visual-box {
    margin-bottom: 16px;
  }
  
  .item-label {
    font-size: 16px;
  }
  
  .item-value {
    font-size: 14px;
  }
}

/* ==================== BUTTONS ==================== */

/* Desktop (default) */
.add-to-cart {
  flex: 1; 
  background-color: var(--color-black); 
  color: var(--color-white);
  height: 50px; 
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-book);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
  text-transform: capitalize;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  border: none;
}

.add-to-cart:hover,
.icon-box:hover {
  background-color: #1d1d1d;
}

.add-to-cart.out-of-stock,
.add-to-cart:disabled {
  background-color: #999;
  cursor: not-allowed;
  opacity: 0.85;
}
.add-to-cart.out-of-stock:hover,
.add-to-cart:disabled:hover {
  background-color: #999;
}

/* "Price on Request" — soft, italic treatment in the price slot */
.price-on-request {
  font-style: italic;
  letter-spacing: 0.5px;
}

/* ============================================================
   PRICE REQUEST MODAL (.pr-*)
   Opens when a customer clicks "Request Price" on a product
   that admin has flagged as request-only.
   ============================================================ */
.pr-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
  font-family: 'Avenir', sans-serif;
}
.pr-modal-overlay.open {
  opacity: 1;
}

.pr-modal {
  background: #fff;
  width: 100%;
  max-width: 460px;
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  position: relative;
  transform: translateY(8px);
  transition: transform 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}
/* Wider variant for the side-by-side product preview + form layout */
.pr-modal--with-image {
  max-width: 860px;
}

/* Two-column layout: product on the left, form on the right */
.pr-modal-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
}

.pr-modal-product {
  padding: 28px 28px;
  background: #ffffff;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.pr-modal-product-name {
  margin: 0 0 18px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #000;
  text-align: center;
  line-height: 1.35;
}

.pr-modal-product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #ffffff;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 2px;
  /* Vertically centre in the remaining column height beneath the name */
  margin-top: auto;
  margin-bottom: auto;
}

/* Right column wrapper — keeps existing .pr-modal-header / .pr-modal-body styles */
.pr-modal-form-side {
  display: flex;
  flex-direction: column;
}

/* Header tweaks when used inside the grid */
.pr-modal--with-image .pr-modal-header {
  text-align: left;
  padding: 30px 30px 0;
}
.pr-modal--with-image .pr-modal-sub {
  display: none;       /* product name now lives next to the image */
}

/* Stack the columns on small screens */
@media (max-width: 700px) {
  .pr-modal--with-image {
    max-width: 480px;
  }
  .pr-modal-grid {
    grid-template-columns: 1fr;
  }
  .pr-modal-product {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 20px 20px 16px;
  }
  .pr-modal-product-name {
    font-size: 16px;
    margin-bottom: 12px;
  }
  .pr-modal-product-image {
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
  }
  .pr-modal--with-image .pr-modal-header {
    text-align: center;
  }
}
.pr-modal-overlay.open .pr-modal {
  transform: translateY(0);
}

.pr-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #000;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s ease;
  padding: 4px 8px;
}
.pr-modal-close:hover { opacity: 1; }

.pr-modal-header {
  padding: 30px 30px 0;
  text-align: center;
}
.pr-modal-header h2 {
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: 0.5px;
  color: #000;
}
.pr-modal-sub {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.6);
  margin: 0;
  font-style: italic;
}

.pr-modal-body {
  padding: 24px 30px 30px;
}

.pr-form {
  display: flex;
  flex-direction: column;
}

.pr-input-group {
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  padding-bottom: 6px;
}
.pr-input-group label {
  display: block;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.65);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.pr-optional {
  text-transform: none;
  letter-spacing: 0.2px;
  opacity: 0.7;
  font-style: italic;
}
.pr-input-group input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #000;
  font-family: inherit;
  font-size: 15px;
  padding: 4px 0;
}
.pr-input-group input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

.pr-submit-btn {
  margin-top: 12px;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  padding: 13px 20px;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}
.pr-submit-btn:hover { background: #1d1d1d; }
.pr-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pr-success {
  text-align: center;
  padding: 8px 0 4px;
  animation: prSuccessIn 0.35s ease;
}
@keyframes prSuccessIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pr-success-icon {
  color: #000;
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.pr-success h3 {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
}
.pr-success p {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.7);
  margin: 0 0 22px;
  line-height: 1.5;
}

.icon-box {
  width: 50px; 
  background-color: var(--color-black);
  height: 50px;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  border: unset;
  padding: 12px;
}

.icon-box img{
  height: 100%;
  width: 100%;
  object-fit: contain;
}
/* ==================== CART ITEMS ==================== */

/* Desktop (default) */


/* Tablet: 768px - 1024px */
@media (min-width: 768px) and (max-width: 1024px) {

}

/* Large Mobile: 481px - 767px */
@media (min-width: 481px) and (max-width: 767px) {

}

/* Mobile: <=480px */
@media (max-width: 480px) {
.add-to-cart {
  flex: 1; 
  background-color: var(--color-black); 
  color: var(--color-white);
  height: 50px; 
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: var(--font-weight-book);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
  text-transform: capitalize;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  border: none;
}
}

/* Large Desktop: 1440px+ */
@media (min-width: 1440px) {
  .cart-item {
    padding: var(--spacing-lg) 0;
    flex-direction: unset;
    gap: unset;
  }
  
  .product-info-cart {
    gap: var(--spacing-md);
  }
  
  .product-img-wrapper {
    width: 120px;
    height: 120px;
    flex-shrink: unset;
  }
  
  .product-details {
    flex: unset;
  }
  
  .product-details h3 {
    font-size: 18px;
  }
  
  .product-total {
    font-size: 18px;
  }
}

/* ==================== CHECKOUT ITEMS ==================== */

/* Desktop (default) */
.checkout-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.item-img-container {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  overflow: hidden;
}

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

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

.item-price {
  font-size: 14px;
  font-weight: var(--font-weight-medium);
}

/* Tablet: 768px - 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  .checkout-item {
    gap: 12px;
    padding: var(--spacing-sm) 0;
  }
  
  .item-img-container {
    width: 60px;
    height: 60px;
  }
  
  .item-name {
    font-size: 14px;
  }
  
  .item-price {
    font-size: 14px;
  }
}

/* Large Mobile: 481px - 767px */
@media (min-width: 481px) and (max-width: 767px) {
  .checkout-item {
    gap: 10px;
    padding: 12px 0;
  }
  
  .item-img-container {
    width: 50px;
    height: 50px;
  }
  
  .item-name {
    font-size: 13px;
  }
  
  .item-price {
    font-size: 13px;
  }
}

/* Mobile: <=480px */
@media (max-width: 480px) {
  .checkout-item {
    gap: 10px;
    padding: 12px 0;
  }
  
  .item-img-container {
    width: 50px;
    height: 50px;
  }
  
  .item-name {
    font-size: 13px;
  }
  
  .item-price {
    font-size: 13px;
  }
}

/* Large Desktop: 1440px+ */
@media (min-width: 1440px) {
  .checkout-item {
    gap: 16px;
    padding: var(--spacing-md) 0;
  }
  
  .item-img-container {
    width: 70px;
    height: 70px;
  }
  
  .item-name {
    font-size: var(--font-size-body-sm);
  }
  
  .item-price {
    font-size: var(--font-size-body-sm);
  }
}

/* ==================== SECTION HEADERS ==================== */

/* Desktop (default) */
.collection-header {
  text-align: center;
  font-size: var(--font-size-h1);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-normal);
  font-weight: 200;
  margin-bottom: 1rem;
  opacity: 70%;
}

.section-title {
  font-size: 30px;
  font-weight: var(--font-weight-light);
  margin: 0;
  line-height: 90%;
  letter-spacing: var(--letter-spacing-tight);
  color: #000;
  opacity: 75%;
}

/* Tablet: 768px - 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  .collection-header {
    font-size: var(--font-size-h2);
    margin-bottom: 1rem;
  }
  
  .section-title {
    font-size: 30px;
  }
}

/* Large Mobile: 481px - 767px */
@media (min-width: 481px) and (max-width: 767px) {
  .collection-header {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-lg);
  }
  
  .section-title {
    font-size: 25px;
    margin-bottom: var(--spacing-md);
  }
}

/* Mobile: <=480px */
@media (max-width: 480px) {
  .collection-header {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-lg);
  }
  
  .section-title {
    font-size: 23px;
    margin-bottom: var(--spacing-md);
  }
}

/* Large Desktop: 1440px+ */
@media (min-width: 1440px) {
  .collection-header {
    font-size: 45px;
    margin-bottom: 2rem;
  }
  
  .section-title {
    font-size: 40px;
    margin-bottom: unset;
  }
}

/* ==================== PURCHASE CONTAINER ==================== */

/* Desktop (default) */
.purchase-container {
  display: flex;
  gap: var(--gap-xs); 
  margin-top: 0px;
  width: 85%;
}

/* Tablet: 768px - 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  .purchase-container {
    gap: var(--gap-xs);
    margin-top: 0px;
    width: 85%;
  }
}

/* Large Mobile: 481px - 767px */
@media (min-width: 481px) and (max-width: 767px) {
  .purchase-container {
    display: flex;
    width: 100%;
    gap: var(--gap-xs);
    margin-top: var(--spacing-md);
  }
}

/* Mobile: <=480px */
@media (max-width: 480px) {
  .purchase-container {
    display: flex;
    width: 100%;
    gap: var(--gap-xs);
    margin-top: 0px;
  }
}

/* Large Desktop: 1440px+ */
@media (min-width: 1440px) {
  .purchase-container {
    gap: var(--gap-sm);
    margin-top: 0px;
    width: 80%;
  }
}
