/* ---------- IMPORT THEME FIRST ---------- */
@import url('theme.css');

/* ---------- GOOGLE FONTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Bebas+Neue&family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&family=Roboto+Condensed:wght@300;400;500;600;700&display=swap');

/* ---------- RESET & GLOBAL ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--color-light);
    color: var(--color-dark);
    line-height: 1.5;
}

.main-content {
    min-height: 80vh;
}

/* Typography using theme variables */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-regular);
    letter-spacing: 0.5px;
}

p,
span,
li,
a {
    font-family: var(--font-body);
}

/* Color theme utility classes */
.text-primary {
    color: var(--color-primary);
}

.text-dark {
    color: var(--color-dark);
}

.text-light {
    color: var(--color-light);
}

.text-accent {
    color: var(--color-accent);
}

.bg-primary {
    background-color: var(--color-primary);
}

.bg-dark {
    background-color: var(--color-dark);
}

.bg-accent {
    background-color: var(--color-accent);
}

.bg-light {
    background-color: var(--color-light);
}

/* Container utility */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

/* Button styles using theme */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: var(--radius-xl);
    font-family: var(--font-body);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-dark);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}



/* ========== FLOATING WHATSAPP BUTTON ========== */
.whatsapp-floating-btn {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Desktop vertical button */
@media (min-width: 769px) {
    .whatsapp-floating-btn {
        right: 0;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        background: linear-gradient(135deg, #25D366, #128C7E);
        border-radius: 12px 0 0 12px;
        padding: 20px 8px;
        box-shadow: -2px 4px 15px rgba(0, 0, 0, 0.2);
        width: auto;
    }

    .whatsapp-icon-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .whatsapp-floating-btn i {
        font-size: 28px;
        color: white;
        margin: 0;
        display: block;
    }

    .whatsapp-tooltip {
        font-size: 12px;
        font-weight: 600;
        color: white;
        text-align: center;
        letter-spacing: 2px;
        line-height: 1.4;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        display: inline-block;
        margin-top: 8px;
    }
}

/* Mobile bottom right button */
@media (max-width: 768px) {
    .whatsapp-floating-btn {
        right: 15px;
        bottom: 90px;
        top: auto;
        transform: none;
        background: #25D366;
        width: 55px;
        height: 55px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
        animation: pulse 1.5s infinite;
    }

    .whatsapp-floating-btn i {
        font-size: 28px;
        color: white;
    }

    .whatsapp-tooltip {
        display: none;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-floating-btn:hover {
    transform: scale(1.05);
}

@media (min-width: 769px) {
    .whatsapp-floating-btn:hover {
        transform: translateY(-50%) scale(1.02);
        background: linear-gradient(135deg, #128C7E, #25D366);
        padding: 20px 12px;
    }
}

/* ========== WHATSAPP MODAL ========== */
.whatsapp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.whatsapp-modal-content {
    background: white;
    width: 90%;
    max-width: 450px;
    border-radius: 20px;
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.whatsapp-modal-header {
    background: linear-gradient(135deg, #25D366, #128C7E);
    padding: 20px;
    text-align: center;
    position: relative;
    color: white;
}

.whatsapp-header-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

.whatsapp-header-icon i {
    font-size: 30px;
    color: #25D366;
}

.whatsapp-modal-header h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.whatsapp-modal-header p {
    font-size: 0.8rem;
    opacity: 0.9;
}

.whatsapp-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.whatsapp-modal-close:hover {
    transform: scale(1.1);
}

.whatsapp-modal-body {
    padding: 25px;
}

.whatsapp-form-group {
    margin-bottom: 18px;
}

.whatsapp-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.required {
    color: #ff4757;
}

.whatsapp-form-group input,
.whatsapp-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.whatsapp-form-group input:focus,
.whatsapp-form-group textarea:focus {
    outline: none;
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.whatsapp-form-group input.error,
.whatsapp-form-group textarea.error {
    border-color: #ff4757;
}

.error-msg {
    font-size: 0.7rem;
    color: #ff4757;
    margin-top: 5px;
    display: none;
}

.error-msg.show {
    display: block;
}

.whatsapp-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.whatsapp-submit-btn:hover {
    transform: translateY(-2px);
    gap: 15px;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.3);
}

/* Mobile Modal Adjustments */
@media (max-width: 480px) {
    .whatsapp-modal-content {
        width: 95%;
        margin: 20px;
    }

    .whatsapp-modal-body {
        padding: 20px;
    }

    .whatsapp-form-group input,
    .whatsapp-form-group textarea {
        padding: 10px 12px;
    }
}

/* Image loading placeholder */
.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    position: relative;
}

.product-img.loading {
    opacity: 0;
}

.product-img.loaded {
    opacity: 1;
}

/* Image loader skeleton */
.image-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-skeleton i {
    font-size: 2rem;
    color: #03b9c8;
    opacity: 0.5;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Category image loading */
.category-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.category-img.loading {
    opacity: 0;
}