/* ========================================
   CUSTOM STYLING FOR OPRAN FURNITURE SITE
   ======================================== */

/* Root Variables */
:root {
    --color-primary: #f59e0b;
    --color-secondary: #f97316;
    --color-dark: #1f2937;
    --color-light: #f9fafb;
}

/* Base Styles */
* {
    scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
}

/* Typography */
body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
}

/* ========================================
   LOGO WORDMARK
   ======================================== */

.wordmark-title {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 1.35rem;
    letter-spacing: 0.22em;
    color: #111827;
    text-transform: uppercase;
    line-height: 1;
    transition: color 0.3s ease;
}

.wordmark-sub {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.52rem;
    letter-spacing: 0.38em;
    color: #d97706;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 4px;
    display: block;
}

a:hover .wordmark-title {
    color: #b45309;
}

/* ========================================
   NAV LINKS
   ======================================== */

.nav-link {
    position: relative;
    padding-bottom: 4px;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #f59e0b, #f97316);
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 2px;
}

.nav-link:hover {
    color: #92400e;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cta {
    padding: 0.45rem 1.1rem;
    border: 1.5px solid #f59e0b;
    color: #92400e;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                border-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-block;
}

/* ========================================
   HERO CTA PRIMARY BUTTON
   ======================================== */

.hero-cta-primary {
    background-color: #92400e;
    color: white;
    border: 2px solid #92400e;
}

.hero-cta-primary:hover {
    background-color: transparent;
    color: white;
    border-color: white;
}

@keyframes nav-cta-bounce {
    0%      { transform: translateY(0); }
    33.33%  { transform: translateY(-4px); }
    100%    { transform: translateY(-2px); }
}

.nav-cta:hover {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
    outline: none;
    animation: nav-cta-bounce 0.3s ease-in-out forwards;
}

/* Animation Delays */
.animation-delay-200 {
    animation-delay: 200ms;
}

.animation-delay-300 {
    animation-delay: 300ms;
}

.animation-delay-400 {
    animation-delay: 400ms;
}

.animation-delay-500 {
    animation-delay: 500ms;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Smooth Scroll Behavior */
@supports (scroll-behavior: smooth) {
    html {
        scroll-behavior: smooth;
    }
}

/* ========================================
   HERO SECTION ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

.animate-blob {
    animation: blob 7s infinite;
}

/* ========================================
   REVEAL ON SCROLL ANIMATIONS
   ======================================== */

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   PRODUCT CARD ENHANCEMENTS
   ======================================== */

.product-card {
    transition: all 0.3s ease;
    transform-origin: center;
}

.product-card:hover {
    transform: translateY(-8px);
}

/* Image hover glow effect */
.product-card .relative::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.3), transparent);
    transition: opacity 0.4s ease;
    border-radius: 1rem;
}

.product-card:hover .relative::after {
    opacity: 1;
}

/* ========================================
   PRODUCTS CAROUSEL
   ======================================== */

.carousel-wrapper {
    position: relative;
    /* extra horizontal space so arrows can sit outside the track */
    padding: 0 40px;
}

@media (max-width: 767px) {
    .carousel-wrapper {
        padding: 0;
    }
}

.carousel-track {
    display: flex;
    gap: 1.75rem;
    overflow-x: auto;
    scroll-behavior: auto;
    padding: 1rem 0.5rem 2rem;
    cursor: grab;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    user-select: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-track.is-dragging {
    cursor: grabbing;
}

.carousel-card {
    flex-shrink: 0;
    width: 220px;
}

@media (min-width: 768px) {
    .carousel-card {
        width: 320px;
    }
}

.carousel-fade-left,
.carousel-fade-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}

@media (max-width: 767px) {
    .carousel-fade-left,
    .carousel-fade-right {
        width: 28px;
    }
}

.carousel-fade-left {
    left: 40px;
    background: linear-gradient(to right, rgba(249,250,251,1) 0%, transparent 100%);
}

.carousel-fade-right {
    right: 40px;
    background: linear-gradient(to left, rgba(249,250,251,1) 0%, transparent 100%);
}

@media (max-width: 767px) {
    .carousel-fade-left  { left: 0; }
    .carousel-fade-right { right: 0; }
}

.carousel-arrow {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 1.5px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: background 0.25s ease, border-color 0.25s ease,
                color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    cursor: pointer;
}

@media (max-width: 767px) {
    .carousel-arrow {
        display: none;
    }
}

.carousel-arrow:hover {
    background: #92400e;
    border-color: #92400e;
    color: white;
    box-shadow: 0 6px 20px rgba(146,64,14,0.3);
    transform: translateY(-50%) scale(1.08);
}

.carousel-arrow-left  { left: -4px; }
.carousel-arrow-right { right: -4px; }

/* ========================================
   MOBILE MENU ANIMATIONS
   ======================================== */

#mobile-menu {
    animation: slideInDown 0.3s ease-out forwards;
}

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

/* ========================================
   FORM STYLING
   ======================================== */

input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #d1d5db;
}

/* Success and error messages */
.form-status-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.form-status-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ========================================
   SMOOTH TRANSITIONS
   ======================================== */

a,
button,
input,
textarea,
select {
    transition: all 0.3s ease;
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */

::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-gradient {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-border {
    position: relative;
    background: white;
    border: 1px solid transparent;
    background-clip: padding-box;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border-radius: inherit;
    padding: 1px;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .animate-fade-in-up {
        font-size: 2rem;
    }

    .product-card {
        margin-bottom: 1rem;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    nav,
    footer {
        display: none;
    }
}

/* ========================================
   DARK MODE SUPPORT (Optional)
   ======================================== */

@media (prefers-color-scheme: dark) {
    /* Can add dark mode styles here if needed */
}

/* ========================================
   ADDITIONAL HOVER EFFECTS
   ======================================== */

.hover-lift {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ========================================
   BUTTON STYLES
   ======================================== */

button[type="submit"] {
    position: relative;
    overflow: hidden;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button[type="submit"]:active::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   LOADING STATES
   ======================================== */

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

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ========================================
   LINK STYLES
   ======================================== */

a {
    text-decoration: none;
    color: inherit;
}

a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ========================================
   TEXT SELECTION
   ======================================== */

::selection {
    background-color: #f59e0b;
    color: white;
}

::-moz-selection {
    background-color: #f59e0b;
    color: white;
}

/* ========================================
   OFFER CONFIGURATOR
   ======================================== */

.offer-step-indicator {
    transition: all 0.25s ease;
}

.offer-type-card {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 0.9rem;
    padding: 1rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.offer-type-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.12);
    transform: translateY(-2px);
}

.offer-type-card.is-selected {
    border-color: #f59e0b;
    background: linear-gradient(180deg, #fff 0%, #fffbeb 100%);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.16);
}

/* ========================================
   ACTIVE NAVIGATION LINK
   ======================================== */

.active-nav {
    color: #f59e0b;
    font-weight: 600;
}

.active-nav::after {
    width: 100% !important;
}

/* ========================================
   PDF MODAL
   ======================================== */

.modal {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#pdfContainer {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
}

#pdfCanvas {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    background: white;
}

/* ========================================
   PDF CARD STYLES
   ======================================== */

.pdf-card {
    transition: all 0.3s ease-out;
}

.pdf-preview-container {
    position: relative;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-preview {
    border-radius: 0.75rem 0.75rem 0 0;
    object-fit: contain;
}

.hover-lift {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px rgba(245, 158, 11, 0.15) !important;
}

/* ========================================
   BUTTON DISABLED STATE
   ======================================== */

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:not(:disabled) {
    cursor: pointer;
}

/* ========================================
   RESPONSIVE PDF VIEWER
   ======================================== */

@media (max-width: 768px) {
    #pdfModal .max-w-6xl {
        max-width: 100% !important;
    }

    #pdfContainer {
        padding: 0.5rem;
    }

    #pdfCanvas {
        max-width: 100%;
        height: auto;
    }
}
