.product-card2 {
background: linear-gradient(135deg, #e3eeff 0%, #f8fbff 100%);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
   position: relative; 
  padding: 2px 2px 15px 2px;
  display: flex;
  flex-direction: column;
}
.product-card2-image {
  width: 100%;
    border-radius: 10px;

  background: #fff;
  padding-top: 100%;
  position: relative;
  overflow: hidden;
  margin-bottom: 5px;
}

.product-card2-image img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.product-card2-image img {
  transform: translate(-50%, -50%) scale(1.04);
}

.product-card2-title {
  margin: 8px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
  min-height: calc(1.4em * 3);
}
.product-card2-title a {
  text-decoration: none;
  color: inherit; 
}

.product-card2-meta {
  display: flex;
  justify-content: center;
  margin-bottom: 5px;
  font-size: clamp(12px, 1.5vw, 14px);
}

.product-card2-meta .product-code {
  text-align: right;
  flex: none;
}
.product-card2-discount-badge {
  position: absolute;
  top: 8px;  
  left: 0;
  background: #EF394EE3;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  padding: 2px 12px;
  border-radius: 4px;
  white-space: nowrap;
}
.product-card2-price {
  margin-bottom: 12px;
    min-height: 50px;
            color: #e63946;
         font-weight: 600;
}

.regular-price-box del {
  color: #999;
  margin-left: 6px;
}

.special-price-box {
  color: #e63946;
  font-weight: 600;
  margin-top: 4px;
}


.product-card2-button a.button {
  background-color: #EF394EE3;
  color: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  display: inline-block;
  text-decoration: none;
 margin-top: auto; 
}
.product-card2-button a.button:hover {
  background-color: #ff4b4b;
}


.product-card2-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  border-radius: 2px;
  pointer-events: none;
}

.product-card2-button button[disabled] {
  background-color: #999;
  color: #fff;
  cursor: not-allowed;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: clamp(12px, 1.8vw, 14px);
}

#addToCartMessage {
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
    display: inline-block;
}

#addToCartMessage.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#addToCartMessage.error {
    background-color: #f8d7da; 
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 250px) {
  .products-grid:not(.swiper-wrapper) .product-card2 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 768px) {
  .product-test-page,
  .products-grid {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .products-grid:not(.swiper-wrapper) {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
  }
.products-grid:not(.swiper-wrapper) .product-card2 {
    flex: 0 0 48%;
    max-width: 48%;
    padding: 8px;
    box-sizing: border-box;
    margin: 10px auto;
}
  .products-grid.swiper-wrapper .swiper-slide .product-card2 {
    width: 100% !important;
    margin: 0 !important;
    padding: 8px !important;
    box-sizing: border-box;
    flex: none !important;
  }
  .product-card2-discount-badge {
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    font-size: 10px;
  }
  .product-card2-title {
    font-weight: 700;
  }
  .product-card2-title,
  .product-card2-meta,
  .product-card2-button a.button {
    font-size: 10px;
  }
    .product-card2-price,
  .product-card2-price .special-price-box{
        font-size: 12px;
        color: #4CAF50;
         font-weight: 600;
  }
}
.product-card2-dropdown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;      
    height: 100%;     
    display: none;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 50;       
    flex-direction: column;
    padding: 16px;
    box-sizing: border-box;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    overflow-y: auto;
      justify-content: center; 
}

.product-card2-dropdown.active {
    display: flex;
    animation: slideFadeDown 0.35s ease forwards;
}
@keyframes slideFadeDown {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}
.product-card2-dropdown .dropdown-back {
    margin-bottom: 12px;
    background: #555;
    color: #fff;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: center; 
}
.variation-option {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    text-align: center;
}
.variation-option p {
    width: 100%;
    margin-bottom: 6px;
    font-weight: 700;
    color: #333;
    font-size: 12px;
}
.variation-btn[data-attribute="pa_color"].active {
    border: 2px solid #000;
    transform: translateY(-4px);
}
.variation-btn {
    padding: 6px 9px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #f4f4f4;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    color: #333;
}
.variation-btn:hover {
    background: #e9e9e9;
}
.variation-btn.active {
    border-color: #e63946;
    background: #ffe6e6;
    color: #e63946;
}
.quantity-selector {
    margin-bottom: 16px;
    text-align: center;
}
.qty-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.qty-wrap button {
    width: 25px;
    height: 25px;
    border: 1px solid #3399ff;
    background: #3399ff33;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
}


.qty-wrap input {
    width: 25px;
    height: 25px;
    text-align: center;
    border: 1px solid #3399ff;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
}
.quantity-selector .qty-wrap {
    margin: 0 auto;
}
.product-card2-dropdown .button {
    margin-top: 12px;
    background: #EF394EE3;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
    align-self: center;
}



@media (max-width: 768px) {
    .product-card2-dropdown {
        width: 100%;
        height: 100%;
        padding: 12px;
    }
    .variation-option p,
    .variation-btn,
    .product-card2-dropdown .button,
    .product-card2-dropdown .dropdown-back {
        font-size: 10px;
        padding: 5px 5px;
    }
    .variation-option {
        gap: 2px;
    }
    .product-card2 {
  padding: 2px 2px 15px 2px;

}
}

.button .spinner-light {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin-light 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes spin-light {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.modal-conten{
        background: #fff;
    padding: 25px 35px;
    border-radius: 15px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    transform: scale(0.9);
    animation: scaleIn 0.25s forwards;

}
.add-to-cart-modal  .modal-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.add-to-cart-modal .modal-content .modal-buttons a {
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-size:15px;
    font-weight: 600;
}

.add-to-cart-modal .modal-content .continue-shopping {
    background: linear-gradient(135deg, #0066ff, #3399ff);
    color: #fff;
}
.add-to-cart-modal .modal-content .view-cart {
    background: linear-gradient(135deg, #28a745, #5cd65c);
    color: #fff;
}
#addToCartModal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 999999999999;
}
#addToCartModal.active {
    opacity: 1;
    pointer-events: auto;
}
#addToCartModal .modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 90%;
    width: 300px;
    text-align: center;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: shake 0.3s;
}

.product-video-icon {
    position: absolute;
    top: 5px;
    width: 35px;
    height: 20px;
    background:#EF394EE3;
    border: 1px;
    border-radius: 10%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px);
    background-clip: padding-box;
}


.product-video-icon svg {
    width: 12px;
    height: 12px;
    fill: white;
}

  .product-card2-image{
    position: relative;
}

.product-new-badge{
    position: absolute;
    right: clamp(2px, 0.5vw, 0);
    bottom: clamp(2px, 0.5vw, 8px);

    background: #22c55e;
    color: #fff;

    font-size: clamp(9px, 1vw, 11px);
    font-weight: 600;

    padding: clamp(2px, 0.4vw, 4px) clamp(5px, 1vw, 8px);

    border-radius: clamp(4px, 0.5vw, 6px);

    line-height: 1.2;
    white-space: nowrap;
    z-index: 10;
}