﻿/* =====================================================
   BUTTONS.CSS - Shared Button Styles
   ===================================================== */

/* Primary Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: white;
    color: #d32f2f;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    }

.btn-outline {
    background: transparent;
    color: white;
    border-color: white;
}

    .btn-outline:hover {
        background: white;
        color: #d32f2f;
    }

.btn-outline-primary {
    background: transparent;
    color: #d32f2f;
    border-color: #d32f2f;
    padding: 10px 24px;
    border-radius: 25px;
}

    .btn-outline-primary:hover {
        background: #d32f2f;
        color: white;
    }

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.btn-add {
    background: #d32f2f;
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

    .btn-add:hover {
        background: #b71c1c;
        transform: scale(1.05);
    }

/* Login Button */
.login-btn {
    background-color: #a10000;
    background-image: linear-gradient(145deg, #a10000, #d72626);
    color: #fff !important;
    font-family: "Poppins", "Segoe UI", sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 12px 32px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    box-shadow: 0 6px 18px rgba(161, 0, 0, 0.35);
}

    .login-btn:hover {
        background-image: linear-gradient(145deg, #d72626, #ff3d3d);
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(215, 38, 38, 0.45);
    }

    .login-btn:active {
        transform: scale(0.98);
    }

    .login-btn:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
    }

/* Login Page Button */
.login-button {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: none;
    border-radius: var(--button-radius, 25px);
    cursor: pointer;
    transition: var(--transition, all 0.3s ease);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #FFFFFF !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

    .login-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        transition: left 0.5s;
    }

    .login-button:hover {
        background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    }

        .login-button:hover::before {
            left: 100%;
        }

    .login-button:active {
        transform: translateY(0);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    }

.button-text {
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #FFFFFF !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

/* Action Buttons */
.btn-edit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

    .btn-edit:hover {
        background: #d32f2f;
        color: white;
        border-color: #d32f2f;
    }

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

    .btn-secondary:hover {
        background: #e0e0e0;
    }

/* Clear Cart Button */
.btn-clear-cart {
    background: none;
    border: none;
    color: #d32f2f;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

    .btn-clear-cart:hover {
        color: #b71c1c;
    }

/* Quantity Buttons */
.btn-qty {
    background: #f9f9f9;
    border: 1px solid #ccc;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

    .btn-qty:hover {
        background: #ffe5e5;
        border-color: #d32f2f;
    }

.qty-btn {
    width: 45px;
    height: 45px;
    border: none;
    background: white;
    color: #d32f2f;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

    .qty-btn:hover {
        background: #fff5f5;
    }

/* Remove Button */
.btn-remove {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #d32f2f;
    cursor: pointer;
    transition: color 0.2s;
}

    .btn-remove:hover {
        color: #b71c1c;
    }

/* Submit Button */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #d32f2f;
    color: white;
    padding: 14px 35px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

    .btn-submit:hover {
        background: #b71c1c;
        transform: scale(1.03);
    }

/* Confirm Button */
.btn-confirm {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

    .btn-confirm:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
    }

    .btn-confirm:disabled {
        background: #ccc;
        cursor: not-allowed;
        transform: none;
    }

/* Load More Button */
.btn-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 35px;
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

    .btn-load-more:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
        background: linear-gradient(135deg, #b71c1c, #8b0000);
    }

    .btn-load-more:active {
        transform: translateY(-1px);
    }

/* Filter Button */
.btn-filter {
    padding: 12px 25px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .btn-filter:hover {
        background: #e5e7eb;
        border-color: #d32f2f;
    }

/* Add to Cart Buttons */
.btn-add-cart {
    padding: 8px 20px;
    background: #d32f2f;
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

    .btn-add-cart:hover {
        background: #b71c1c;
        transform: scale(1.05);
    }

    .btn-add-cart:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

.btn-add-to-cart-detail {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 30px;
    background: #d32f2f;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

    .btn-add-to-cart-detail:hover {
        background: #b71c1c;
        transform: scale(1.02);
    }

.btn-out-of-stock {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 30px;
    background: #ccc;
    color: #666;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: not-allowed;
}

/* Favorite Button */
.btn-favorite {
    width: 50px;
    height: 50px;
    border: 2px solid #d32f2f;
    background: white;
    color: #d32f2f;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

    .btn-favorite:hover,
    .btn-favorite.active {
        background: #d32f2f;
        color: white;
    }

    .btn-favorite.heart-beat {
        animation: heartBeat 0.6s ease;
    }

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1.1);
    }

    75% {
        transform: scale(1.2);
    }
}

/* Back Button */
.btn-back {
    display: inline-block;
    padding: 10px 25px;
    color: #666;
    text-decoration: none;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    transition: all 0.3s;
}

    .btn-back:hover {
        border-color: #d32f2f;
        color: #d32f2f;
    }

/* View Detail Button */
.btn-view-detail {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
}

    .btn-view-detail:hover {
        border-color: #2196f3;
        background: #e3f2fd;
        color: #2196f3;
    }

/* Remove Favorite Button */
.btn-remove-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    color: #d32f2f;
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

    .btn-remove-favorite:hover {
        background: #d32f2f;
        color: white;
        transform: scale(1.1);
    }

/* View All Promo Button */
.btn-view-all-promo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #d32f2f;
    padding: 12px 30px;
    border: 2px solid #d32f2f;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

    .btn-view-all-promo:hover {
        background: #d32f2f;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(211, 47, 47, 0.3);
    }

/* Use Promo Button */
.btn-use-promo {
    background: #d32f2f;
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    white-space: nowrap;
}

    .btn-use-promo:hover {
        background: #b71c1c;
        transform: scale(1.05);
        box-shadow: 0 5px 15px rgba(211, 47, 47, 0.3);
    }

/* View Detail Action Button */
.btn-view-detail {
    padding: 8px 20px;
    background: transparent;
    color: #2196f3;
    border: 2px solid #2196f3;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

    .btn-view-detail:hover {
        background: #2196f3;
        color: white;
    }

/* Focus States */
button:focus-visible {
    outline: 2px solid var(--secondary-color, #7f7bee);
    outline-offset: 2px;
}

/* Loading State */
.btn-add.loading,
.btn-add-to-cart-detail.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

    .btn-add.loading::after,
    .btn-add-to-cart-detail.loading::after {
        content: '';
        position: absolute;
        width: 16px;
        height: 16px;
        top: 50%;
        left: 50%;
        margin-left: -8px;
        margin-top: -8px;
        border: 2px solid rgba(255,255,255,0.3);
        border-radius: 50%;
        border-top-color: white;
        animation: spinner 0.6s linear infinite;
    }

/* Load More Button */
.btn-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 35px;
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

    .btn-load-more:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
        background: linear-gradient(135deg, #b71c1c, #8b0000);
    }

    .btn-load-more:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.load-more-container {
    animation: fadeIn 0.5s ease-out;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .btn {
        width: 100%;
        text-align: center;
    }

    .btn-load-more {
        padding: 12px 28px;
        font-size: 1rem;
        width: 90%;
        max-width: 300px;
    }
}
