/* Add to Cart Modal Styles */
.add-to-cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.add-to-cart-modal.active {
    opacity: 1;
}

.add-to-cart-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.add-to-cart-modal__content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    direction: rtl;
}

.add-to-cart-modal.active .add-to-cart-modal__content {
    transform: scale(1);
}

.add-to-cart-modal__close {
    position: absolute;
    top: 12px;
    left: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #666;
    transition: color 0.2s;
}

.add-to-cart-modal__close:hover {
    color: #000;
}

.add-to-cart-modal__header {
    display: flex;
    gap: 16px;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.add-to-cart-modal__header img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.add-to-cart-modal__header h3 {
    font-size: 16px;
    margin: 0;
    color: #333;
}

.add-to-cart-modal__variants {
    margin-bottom: 24px;
}

.add-to-cart-modal__section {
    margin-bottom: 20px;
}

.add-to-cart-modal__label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.add-to-cart-modal__select {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    direction: rtl;
}

.add-to-cart-modal__select:focus {
    outline: none;
    border-color: #ff00d2;
}

.add-to-cart-modal__colors {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-option {
    cursor: pointer;
}

.color-option input {
    display: none;
}

.color-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}

.color-option:hover .color-circle {
    transform: scale(1.1);
    border-color: #ff00d2;
}

.color-option input:checked + .color-circle {
    border-color: #ff00d2;
    border-width: 3px;
}

.color-check {
    opacity: 0;
    transition: opacity 0.2s;
}

.color-option input:checked + .color-circle .color-check {
    opacity: 1;
}

.add-to-cart-modal__footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.add-to-cart-modal__price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    margin-bottom: 16px;
}

.add-to-cart-modal__price strong {
    background: linear-gradient(135deg, #ff00d2, #7d0096);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 22px;
}

.add-to-cart-modal__quantity {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.add-to-cart-modal__quantity label {
    font-size: 14px;
    font-weight: 600;
}

.add-to-cart-modal__quantity input {
    width: 60px;
    text-align: center;
    padding: 8px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 1.5px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: #f5f5f5;
    border-color: #ff00d2;
}

.add-to-cart-modal__submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ff00d2, #7d0096);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-modal__submit:hover {
    opacity: 0.88;
}

.add-to-cart-modal__submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.add-to-cart-modal__loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.add-to-cart-modal__error {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
}

/* Success Toast */
.cart-success-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #4caf50;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.cart-success-toast.active {
    transform: translateX(0);
}

.cart-success-toast svg {
    flex-shrink: 0;
}

/* Product Card Button Styles */
.product-card__actions {
    padding: 12px;
    border-top: 1px solid #f0f0f0;
}

.product-card__add-to-cart,
.product-card__contact-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.product-card__add-to-cart {
    background: linear-gradient(135deg, #ff00d2, #7d0096);
    color: white;
}

.product-card__add-to-cart:hover {
    opacity: 0.88;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 0, 210, 0.35);
}

.product-card__contact-btn {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.product-card__contact-btn:hover {
    background: #eee;
}

/* Cart Counter Animation */
.headers__btns--cart-counter.bounce,
.header-count span.bounce {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .add-to-cart-modal__content {
        width: 95%;
        padding: 20px;
    }

    .add-to-cart-modal__header img {
        width: 60px;
        height: 60px;
    }

    .cart-success-toast {
        right: 10px;
        left: 10px;
        top: 70px;
    }
}

/* ====== Homepage Floating Add-to-Cart Overlay ====== */

/* Wrapper inside carousel items — position: relative here, NOT on the item itself
   (putting it on the item breaks the carousel's transform-based positioning) */
.hp-card-image-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
}

/* Overlay button — sits on top of card/image, never affects height/layout */
.hp-add-to-cart-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 10px 6px;
    background: linear-gradient(135deg, rgba(255, 0, 210, 0.82), rgba(125, 0, 150, 0.82));
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: opacity 0.2s, background 0.2s;
    border-radius: 0 0 8px 8px;
    z-index: 2;
}

/* ====== Rokh Azin Info Block (footer) ====== */
.footer__rokhazin-info {
    width: 100%;
    padding: 16px 20px;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    font-size: 13px;
    line-height: 2;
    color: #555;
    text-align: right;
    direction: rtl;
}

.footer__rokhazin-info p {
    margin: 0 0 4px 0;
}

.footer__rokhazin-info p span {
    margin-left: 16px;
}

.footer__rokhazin-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 6px !important;
}

.footer__rokhazin-info a {
    color: #7d0096;
    text-decoration: none;
}

.footer__rokhazin-info a:hover {
    text-decoration: underline;
}

/* ====== Product Card Layout Fix ====== */
/* Flex column so sections stack predictably inside a fixed height */
.product-card {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    height: 430px !important;
}

/* Image link grows to fill remaining space */
.product-card > a {
    flex: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
}

.product-card > a img {
    max-height: 100%;
    width: 100%;
    object-fit: contain;
}

/* These sections never grow — only shrink if needed */
.product-card__variety-info,
.product-card-information,
.product-card__actions {
    flex-shrink: 0;
}

/* Mobile override */
@media (max-width: 811px) {
    .product-card {
        height: 310px !important;
    }
}
