/* App Layout Styles */

/* Base CSS utilities */
[x-cloak] {
    display: none !important;
}

.rtl {
    direction: rtl;
}

.arabic {
    font-family: 'Tajawal', system-ui, sans-serif;
}

/* Arabic font hierarchy using Tajawal - High specificity */
html[lang="ar"] * {
    font-family: 'Tajawal', 'Amiri', 'Noto Sans Arabic', system-ui, sans-serif !important;
}

html[lang="ar"] body {
    font-family: 'Tajawal', 'Amiri', 'Noto Sans Arabic', system-ui, sans-serif !important;
    font-weight: 400;
    direction: rtl !important;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6 {
    font-family: 'Tajawal', 'Amiri', 'Noto Sans Arabic', system-ui, sans-serif !important;
    font-weight: 700;
}

html[lang="ar"] .font-display {
    font-family: 'Tajawal', 'Amiri', sans-serif !important;
    font-weight: 900;
}

html[lang="ar"] .font-heading {
    font-family: 'Tajawal', 'Amiri', sans-serif !important;
    font-weight: 700;
}

html[lang="ar"] .font-subheading {
    font-family: 'Tajawal', 'Amiri', sans-serif !important;
    font-weight: 400;
}

html[lang="ar"] .font-body {
    font-family: 'Tajawal', 'Amiri', sans-serif !important;
    font-weight: 400;
}

html[lang="ar"] .font-light {
    font-family: 'Tajawal', 'Amiri', sans-serif !important;
    font-weight: 300;
}

html[lang="ar"] .font-thin {
    font-family: 'Tajawal', 'Amiri', sans-serif !important;
    font-weight: 200;
}

html[lang="ar"] .font-extralight {
    font-family: 'Tajawal', 'Amiri', sans-serif !important;
    font-weight: 200;
}

/* Make sure the Arabic class works everywhere */
.arabic {
    font-family: 'Tajawal', 'Amiri', 'Noto Sans Arabic', system-ui, sans-serif !important;
    font-weight: 500 !important;
}

/* Arabic navbar text */
html[lang="ar"] nav .font-subheading {
    font-family: 'Tajawal', 'Amiri', sans-serif !important;
    font-weight: 400 !important;
    font-size: 1em !important;
}

/* Fix for RTL spacing utilities */
.rtl .space-x-reverse > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

/* Typography for luxury perfume brand using Lato */
body {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 300;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Default to Lato for English and French */
html[lang="en"] body,
html[lang="fr"] body {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 300;
}

html[lang="en"] *,
html[lang="fr"] * {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Font weight hierarchy for luxury design using Lato */
.font-display {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 900;
}

.font-heading {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 700;
}

.font-subheading {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 500;
}

.font-body {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 400;
}

.font-light {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 300;
}

.font-thin {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 100;
}

.font-extralight {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 200;
}

/* Lato utility classes for consistent naming */
.font-roboto-thin {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 100;
}

.font-roboto-extralight {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 200;
}

.font-roboto-light {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 300;
}

.font-roboto-regular {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 400;
}

.font-roboto-medium {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 500;
}

.font-roboto-bold {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 700;
}

.font-roboto-black {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 900;
}

/* Arabic Roboto classes for consistent naming - High specificity */
html[lang="ar"] .font-roboto-thin {
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 200;
}

html[lang="ar"] .font-roboto-extralight {
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 200;
}

html[lang="ar"] .font-roboto-light {
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 300;
}

html[lang="ar"] .font-roboto-regular {
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 400;
}

html[lang="ar"] .font-roboto-medium {
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 500;
}

html[lang="ar"] .font-roboto-bold {
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 700;
}

html[lang="ar"] .font-roboto-black {
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 900;
}

/* Consistent transitions */
a, button, input, textarea, select {
    transition: all 0.2s ease;
}

/* Default to normal font weight for buttons and form elements */
button, input, textarea, select {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 400;
}

/* Theme-aware layout */
.header-bg {
    background: linear-gradient(180deg, rgba(var(--color-primary), 0.95) 0%, rgba(var(--color-primary), 0.8) 100%);
}

/* Responsive margin adjustments */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* CTA Button Animation */
.cta-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

/* Product Card Hover Effects */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-image {
    transition: transform 0.3s ease;
}

/* Pagination shadow effect */
.pagination-card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Features Section Enhancements */
.feature-item {
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-4px);
}

.feature-icon {
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
    transform: scale(1.1);
    color: var(--color-secondary);
}

/* Newsletter Section */
.newsletter-bg {
    background: linear-gradient(135deg, rgba(var(--color-primary), 0.95) 0%, rgba(var(--color-primary), 0.8) 100%);
}

/* Hero Section */
.hero-bg {
    background: linear-gradient(135deg, rgba(var(--color-primary), 0.1) 0%, rgba(var(--color-secondary), 0.05) 100%);
}

/* Cart Animation */
.cart-bounce {
    animation: cartBounce 0.3s ease-in-out;
}

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

/* Loading Animation */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    transition: all 0.3s ease;
    transform: translateY(100px);
    opacity: 0;
}

.scroll-to-top.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Form Focus States */
.form-input:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(var(--color-secondary), 0.1);
}

/* Toast Notifications */
.toast {
    animation: slideInRight 0.3s ease-out;
}

.toast.removing {
    animation: slideOutRight 0.3s ease-in;
}

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

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

/* Brand Logo Hover Effect */
.brand-logo {
    transition: all 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Section Spacing */
.section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}

/* Utility Classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}