/**
 * Avyra Main Stylesheet
 * 
 * This file contains the main styles for the Avyra theme.
 * It imports Tailwind-like utility classes and custom styles.
 */

/* ========================================
   CSS Variables (Design Tokens)
   ======================================== */
:root {
    --color-primary: #292524;
    --color-accent: #9F1239;
    --color-accent-dark: #881337;
    --color-white: #ffffff;
    --color-stone-50: #fafaf9;
    --color-stone-100: #f5f5f4;
    --color-stone-200: #e7e5e4;
    --color-stone-300: #d6d3d1;
    --color-stone-400: #a8a29e;
    --color-stone-500: #78716c;
    --color-stone-600: #57534e;
    --color-stone-700: #44403c;
    --color-stone-800: #292524;
    
    --font-sans: 'Mulish', sans-serif;
    --font-heading: 'Lora', serif;
}

/* ========================================
   Base Styles
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-primary);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

/* ========================================
   Navigation Styles
   ======================================== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--color-accent) !important;
}

/* Mobile Menu Transitions */
#mobile-menu-overlay {
    transition: opacity 0.3s ease-in-out, visibility 0.3s;
}

#mobile-menu-drawer {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.menu-open {
    overflow: hidden;
}

/* Submenu Animation */
.submenu-wrapper {
    transition: max-height 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

.submenu-wrapper.open {
    max-height: 500px;
}

.rotate-90 {
    transform: rotate(90deg);
}

/* Collapsed nav bar */
.nav-collapsed {
    height: 0 !important;
    opacity: 0;
    overflow: hidden;
    margin: 0 !important;
    border: none !important;
}

/* ========================================
   Back to Top Button
   ======================================== */
#back-to-top {
    transition: opacity 0.3s, transform 0.3s;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top.hide {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-accent-dark);
    color: var(--color-white);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* ========================================
   Forms
   ======================================== */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"],
textarea,
select {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-stone-200);
    border-radius: 0.125rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 1px var(--color-accent);
}

/* ========================================
   Product Cards
   ======================================== */
.product-card {
    cursor: pointer;
}

.product-card .product-image {
    position: relative;
    overflow: hidden;
}

.product-card .product-actions {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    opacity: 0;
    transform: translateY(0.5rem);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Utility Classes
   ======================================== */
.text-accent {
    color: var(--color-accent);
}

.bg-accent {
    background-color: var(--color-accent);
}

.font-heading {
    font-family: var(--font-heading);
}

.tracking-luxury {
    letter-spacing: 0.1em;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

/* ========================================
   Responsive Utilities
   ======================================== */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}
