/* 
 * Product Action Buttons - Add to Cart & View Details
 * Emirates Gifts Store v2.0
 */

.product-actions {
    display: grid;
    grid-template-columns: 1fr 50px;
    gap: 10px;
    margin-top: 15px;
    width: 100%;
}

/* Add to Cart Button */
.add-to-cart-btn {
    background: linear-gradient(135deg, #25D366 0%, #20B358 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Cairo', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
    position: relative;
    overflow: hidden;
    min-height: 44px;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.add-to-cart-btn:hover::before {
    left: 100%;
}

.add-to-cart-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.5);
    background: linear-gradient(135deg, #20B358, #1fa34d);
}

.add-to-cart-btn:active {
    transform: translateY(-1px);
}

.add-to-cart-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.add-to-cart-btn:focus-visible {
    outline: 3px solid rgba(37, 211, 102, 0.6);
    outline-offset: 2px;
    border-radius: 12px;
}

.add-to-cart-btn i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover i {
    transform: scale(1.15) rotate(-10deg);
}

/* View Details Button */
.view-details-btn {
    background: linear-gradient(135deg, #D4AF37, #FFD700);
    color: #1B2951;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 50px;
    min-height: 44px;
    padding: 0;
    width: 100%;
}

.view-details-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s ease;
}

.view-details-btn:hover::before {
    left: 100%;
}

.view-details-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.5);
    background: linear-gradient(135deg, #FFD700, #D4AF37);
}

.view-details-btn:active {
    transform: translateY(-1px);
}

.view-details-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.view-details-btn:focus-visible {
    outline: 3px solid rgba(212, 175, 55, 0.6);
    outline-offset: 2px;
    border-radius: 12px;
}

.view-details-btn i {
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.view-details-btn:hover i {
    transform: scale(1.2);
}

/* Product Discount Badge */
.product-discount {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    z-index: 10;
    box-shadow: 0 6px 15px rgba(231, 76, 60, 0.4);
    animation: slideInDown 0.6s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product Title */
.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 12px 0;
    line-height: 1.4;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-wrap: break-word;
}

/* Product Price Display */
.product-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 15px 0 20px 0;
}

.price-current {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-gold);
    animation: scaleIn 0.5s ease-out;
}

.price-original {
    font-size: 1rem;
    color: #e74c3c;
    text-decoration: line-through;
    font-weight: 600;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Cart Integration Notifications */
[data-notification] {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: linear-gradient(135deg, #25D366, #20B358);
    color: white;
    padding: 18px 25px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    z-index: 9999;
    max-width: 380px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    font-family: 'Cairo', sans-serif;
    animation: slideInUp 0.4s ease-out;
    display: flex;
    align-items: center;
    gap: 12px;
}

[data-notification][data-notification="error"] {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Cart Badge Styling */
.cart-counter,
.cart-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 10;
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-actions {
        grid-template-columns: 1fr 45px;
        gap: 8px;
    }
    
    .add-to-cart-btn {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    
    .view-details-btn {
        min-width: 45px;
        min-height: 44px;
    }
    
    [data-notification] {
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
        bottom: 20px;
    }
    
    .product-title {
        font-size: 1rem;
        min-height: 45px;
    }
    
    .price-current {
        font-size: 1.3rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .add-to-cart-btn {
        background: linear-gradient(135deg, #25D366 0%, #20B358 100%);
    }
    
    .view-details-btn {
        background: linear-gradient(135deg, #D4AF37, #FFD700);
        color: #1B2951;
    }
    
    .product-title {
        color: #e8f4f8;
    }
    
    .price-current {
        color: #FFD700;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .add-to-cart-btn,
    .view-details-btn,
    [data-notification],
    .product-discount,
    .product-price {
        animation: none;
        transition: none;
    }
}
