@import 'tailwindcss';

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../**/*.blade.php';
@source '../**/*.js';

@theme {
    --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
        'Segoe UI Symbol', 'Noto Color Emoji';
}

/* Global layout styles migrated from inline blade */
:root {
    --navy: #151514;
    --gold: #f8d25c;
    --white: #FFFFFF;
    --light-gray: #151514;
    --text-main: #FFFFFF;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #151514;
    color: #FFFFFF;
}

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

/* Cart count badge */
.cart-count {
    background: #f8d25c;
    color: #000;
    border-radius: 999px;
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    min-width: 1.25rem;
    text-align: center;
    display: inline-block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

html[dir="rtl"] .container {
    direction: rtl;
}

header {
    background: linear-gradient(120deg, #151514 0%, #151514 70%);
    color: #FFFFFF;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 6px 30px -10px rgba(0, 0, 0, 0.8), 0 1.5px 0px rgba(248, 210, 92, 0.47) inset;
    transition: box-shadow 0.3s;
    border-bottom: 1px solid rgba(248, 210, 92, 0.2);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: 80px;
    padding: 0;
    width: 100%;
    flex-wrap: nowrap;
    flex-direction: row;
}

html[dir="rtl"] .nav {
    flex-direction: row-reverse;
}

.nav .brand {
    order: 1;
}

.nav .nav-links {
    order: 2;
}

.nav .nav-actions {
    order: 3;
}

html[dir="rtl"] .nav .brand {
    order: 3;
}

html[dir="rtl"] .nav .nav-links {
    order: 2;
}

html[dir="rtl"] .nav .nav-actions {
    order: 1;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: fit-content;
}

html[dir="rtl"] .nav-actions {
    flex-direction: row-reverse;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

html[dir="rtl"] .brand {
    padding-inline-start: 1.25rem;
    padding-inline-end: 0;
    border-inline-start: 1px solid rgba(248, 210, 92, 0.3);
    border-inline-end: 0;
}

html[dir="ltr"] .brand {
    padding-inline-start: 0;
    padding-inline-end: 1.25rem;
    border-inline-start: 0;
    border-inline-end: 1px solid rgba(248, 210, 92, 0.3);
}

.brand:hover {
    opacity: 0.9;
}

.brand-logo {
    height: 70px;
    width: auto;
    display: block;
    object-fit: contain;
}

html[dir="rtl"] .brand-logo {
    height: 70px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    gap: 0.1rem;
}

.brand-title {
    font-weight: 800;
    letter-spacing: 0.05em;
    font-size: 1.35rem;
    color: #FFFFFF;
}

html[dir="rtl"] .brand-title {
    font-size: 1.2rem;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: #FFFFFF;
}

html[dir="rtl"] .brand-subtitle {
    font-size: 0.75rem;
}

.nav-links {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    min-width: 0;
    flex-wrap: nowrap;
    max-width: 100%;
}

/* Primary links: stay on one row; scroll horizontally if the bar is tight */
.nav-links-main {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: center;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-links-main::-webkit-scrollbar {
    display: none;
}

/* Cart/admin/profile: never wrap to a second row under the main links */
.nav-links-user {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.5rem;
    margin-inline-start: 0.35rem;
    padding-inline-start: 1rem;
    border-inline-start: 1px solid rgba(75, 85, 99, 0.9);
}

html[dir="rtl"] .nav-links-user {
    margin-inline-start: 0;
    margin-inline-end: 0.35rem;
    padding-inline-start: 0;
    padding-inline-end: 1rem;
    border-inline-start: none;
    border-inline-end: 1px solid rgba(75, 85, 99, 0.9);
}

@media (max-width: 1320px) and (min-width: 1025px) {
    .nav-links .nav-link {
        padding: 0.35rem 0.55rem;
        font-size: 0.86rem;
    }

    .nav-links-user .btn-primary,
    .nav-links-user a[href*="login"],
    .nav-links-user a[href*="register"] {
        padding-left: 0.65rem !important;
        padding-right: 0.65rem !important;
        font-size: 0.8rem !important;
    }
}

html[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

.nav-link {
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    color: #FFFFFF;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-block;
}

.nav-link:hover {
    color: #f8d25c;
    box-shadow: inset 0 0 0 1px rgba(248, 210, 92, 0.5);
    background: rgba(248, 210, 92, 0.1);
}

.nav-link-active {
    background: linear-gradient(135deg, #f8d25c, #f8d25c);
    color: #151514;
    box-shadow: 0 8px 20px rgba(248, 210, 92, 0.5);
    font-weight: 600;
}

.lang-toggle {
    border: 1px solid rgba(248, 210, 92, 0.6);
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    color: #FFFFFF;
    font-size: 0.85rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lang-toggle:hover {
    background: rgba(248, 210, 92, 0.2);
    color: #f8d25c;
    transform: translateY(-1px);
    border-color: rgba(248, 210, 92, 0.8);
}

main {
    min-height: 70vh;
    background-color: #151514;
    color: #FFFFFF;
}

footer {
    background-color: #151514;
    color: #FFFFFF;
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

footer a {
    color: #FFFFFF;
    opacity: 0.9;
    transition: opacity 0.2s, color 0.2s;
}

footer a:hover {
    opacity: 1;
    color: #FFFFFF;
}

footer h4 {
    color: #FFFFFF;
}

footer .brand-title {
    color: #FFFFFF;
}

footer .brand-subtitle {
    color: #FFFFFF;
    opacity: 0.9;
}

footer p {
    color: #FFFFFF;
    opacity: 0.9;
}

.badge-gold {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(248, 210, 92, 0.2);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(248, 210, 92, 0.4);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    background: linear-gradient(to left, #f8d25c, #f8d25c);
    color: #151514;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    border-radius: 9999px;
    background: transparent;
    color: #FFFFFF;
    border: 1px solid rgba(248, 210, 92, 0.6);
    font-size: 0.9rem;
    cursor: pointer;
}

.section {
    padding: 3rem 0;
}

.section-header {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
}

.section-subtitle {
    margin-top: 0.5rem;
    color: #FFFFFF;
    opacity: 0.8;
    font-size: 0.95rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: #151514;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 12px 30px rgba(248, 210, 92, 0.1);
    border: 1px solid rgba(248, 210, 92, 0.2);
    color: #FFFFFF;
}

.card-muted {
    background: linear-gradient(to left, #151514, #151514);
    color: #FFFFFF;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.85rem;
    color: #FFFFFF;
    opacity: 0.8;
}

.badge-soft {
    display: inline-flex;
    padding: 0.25rem 0.7rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    background-color: rgba(248, 210, 92, 0.15);
    color: #FFFFFF;
    border: 1px solid rgba(248, 210, 92, 0.3);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background-color: #151514;
    border-radius: 0.75rem;
    overflow: hidden;
    color: #FFFFFF;
    border: 1px solid rgba(248, 210, 92, 0.2);
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(248, 210, 92, 0.2);
}

.table thead th {
    background-color: rgba(248, 210, 92, 0.1);
    font-weight: 600;
    color: #FFFFFF;
}

.disclaimer {
    font-size: 0.8rem;
    color: #FFFFFF;
    opacity: 0.8;
    margin-top: 0.75rem;
}

form .field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

form label {
    font-size: 0.85rem;
    font-weight: 500;
}

form input,
form select,
form textarea {
    border-radius: 0.75rem;
    border: 1px solid rgba(248, 210, 92, 0.3);
    padding: 0.6rem 0.8rem;
    font-family: inherit;
    font-size: 0.9rem;
    background-color: #151514;
    color: #FFFFFF;
}

form input:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: #f8d25c;
    box-shadow: 0 0 0 1px rgba(248, 210, 92, 0.5);
}

.error-text {
    color: #B91C1C;
    font-size: 0.78rem;
}

.alert-success {
    background-color: rgba(248, 210, 92, 0.1);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(248, 210, 92, 0.4);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    color: #FFFFFF;
}

.accordion-item {
    border-radius: 0.75rem;
    background-color: #151514;
    margin-bottom: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(248, 210, 92, 0.2);
}

.accordion-header {
    padding: 0.9rem 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #FFFFFF;
}

.accordion-body {
    padding: 0 1rem 1rem;
    font-size: 0.9rem;
    color: #FFFFFF;
    opacity: 0.9;
}

.mobile-nav-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.8rem;
}

.mobile-nav-btn span,
.mobile-nav-btn span::before,
.mobile-nav-btn span::after {
    display: block;
    background: linear-gradient(90deg, #f8d25c, #f8d25c);
    height: 3.2px;
    width: 32px;
    margin: 8px 0;
    border-radius: 2px;
    transition: 0.3s cubic-bezier(0.4, 2, 0.6, 1.5);
    content: '';
}

.mobile-nav-btn span::before {
    transform: translateY(-10px);
}

.mobile-nav-btn span::after {
    transform: translateY(7px);
}

.mobile-nav-btn.active span {
    background: transparent;
}

.mobile-nav-btn.active span::before {
    transform: translateY(0) rotate(43deg);
    background: #f8d25c;
}

.mobile-nav-btn.active span::after {
    transform: translateY(-3px) rotate(-43deg);
    background: #f8d25c;
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(21, 21, 20, 0.85);
    -webkit-backdrop-filter: blur(2.5px);
    backdrop-filter: blur(2.5px);
    z-index: 80;
    animation: fadeIn 0.3s cubic-bezier(0.42, 0, 1, 1);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    background: linear-gradient(90deg, #151514 70%, #151514 300%);
    padding: 4.25rem 1.25rem 2rem;
    border-bottom-left-radius: 1.2em;
    border-bottom-right-radius: 1.2em;
    box-shadow: 0 9px 36px 3px rgba(248, 210, 92, 0.2);
    border-bottom: 2px solid rgba(248, 210, 92, 0.3);
    z-index: 99;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: 0.38s cubic-bezier(0.54, 2, 0.65, 1.3);
    text-align: start;
}

html[dir="rtl"] .mobile-nav-links {
    text-align: right;
}

html[dir="ltr"] .mobile-nav-links {
    text-align: left;
}

.mobile-nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-overlay.open {
    display: block;
}

.mobile-nav-links a {
    font-size: 1.2rem;
    padding: 1rem;
    border-radius: 0.7em;
    background: none;
    color: #FFFFFF;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-shadow: 0 0.5px 4px #0a192f50;
    transition: background 0.15s, color 0.15s;
    width: 100%;
    border: 1px solid transparent;
    text-align: start;
}

html[dir="rtl"] .mobile-nav-links a {
    text-align: right;
}

html[dir="ltr"] .mobile-nav-links a {
    text-align: left;
}

.mobile-nav-links a:hover {
    background: rgba(248, 210, 92, 0.15);
    color: #f8d25c;
    border-color: rgba(248, 210, 92, 0.3);
}

.mobile-nav-links a.nav-link-active {
    background: linear-gradient(90deg, #f8d25c, #f8d25c 70%, #f8d25c 120%);
    color: #151514;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .nav {
        height: 72px;
        padding: 0 1rem;
        gap: 1rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-nav-btn {
        display: inline-flex;
        z-index: 100;
    }

    html[dir="rtl"] .brand {
        padding-inline-start: 0.75rem;
        padding-inline-end: 0;
        border-inline-start: none;
        border-inline-end: 0;
    }

    html[dir="ltr"] .brand {
        padding-inline-start: 0;
        padding-inline-end: 0.75rem;
        border-inline-start: 0;
        border-inline-end: none;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

    .nav {
        height: 70px;
        padding: 0 1rem;
        backdrop-filter: blur(20px);
        background: rgba(21, 21, 20, 0.95);
    }

    .brand-logo {
        height: 40px !important;
        width: auto !important;
        transition: transform 0.3s ease;
    }

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

    .mobile-nav-btn {
        display: inline-flex;
        z-index: 100;
        padding: 0.75rem;
        border-radius: 12px;
        background: rgba(248, 210, 92, 0.1);
        border: 1px solid rgba(248, 210, 92, 0.2);
        transition: all 0.3s ease;
    }

    .mobile-nav-btn:hover {
        background: rgba(248, 210, 92, 0.2);
        transform: scale(1.05);
    }

    .mobile-nav-btn span,
    .mobile-nav-btn span::before,
    .mobile-nav-btn span::after {
        height: 2.5px;
        width: 24px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-nav-btn span::before {
        transform: translateY(-8px);
    }

    .mobile-nav-btn span::after {
        transform: translateY(6px);
    }

    .mobile-nav-btn.active span {
        background: transparent;
    }

    .mobile-nav-btn.active span::before {
        transform: translateY(0) rotate(45deg);
        background: #f8d25c;
    }

    .mobile-nav-btn.active span::after {
        transform: translateY(-2px) rotate(-45deg);
        background: #f8d25c;
    }

    .mobile-nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: linear-gradient(135deg, rgba(21, 21, 20, 0.98) 0%, rgba(21, 21, 20, 0.95) 100%);
        backdrop-filter: blur(20px);
        z-index: 90;
        animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-nav-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        position: fixed;
        top: 0;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: linear-gradient(135deg, rgba(21, 21, 20, 0.98) 0%, rgba(21, 21, 20, 0.95) 100%);
        backdrop-filter: blur(20px);
        padding: 6rem 1.5rem 2rem;
        opacity: 0;
        pointer-events: none;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 99;
    }

    /* LTR Drawer (Right) */
    html[dir="ltr"] .mobile-nav-links {
        right: 0;
        transform: translateX(100%);
        border-left: 1px solid rgba(248, 210, 92, 0.2);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
    }

    html[dir="ltr"] .mobile-nav-links.open {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* RTL Drawer (Left) */
    html[dir="rtl"] .mobile-nav-links {
        left: 0;
        right: auto;
        transform: translateX(-100%);
        border-right: 1px solid rgba(248, 210, 92, 0.2);
        border-left: none;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.3);
    }

    html[dir="rtl"] .mobile-nav-links.open {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-nav-links a {
        font-size: 1.1rem;
        padding: 1rem 1.25rem;
        border-radius: 16px;
        border: 1px solid transparent;
        transition: all 0.3s ease;
        font-weight: 500;
        position: relative;
        overflow: hidden;
    }

    .mobile-nav-links a::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(248, 210, 92, 0.1), transparent);
        transition: left 0.5s ease;
    }

    .mobile-nav-links a:hover::before {
        left: 100%;
    }

    .mobile-nav-links a:hover {
        background: rgba(248, 210, 92, 0.15);
        color: #f8d25c;
        border-color: rgba(248, 210, 92, 0.3);
        transform: translateX(-4px);
    }

    .mobile-nav-links a.nav-link-active {
        background: linear-gradient(135deg, rgba(248, 210, 92, 0.2) 0%, rgba(248, 210, 92, 0.1) 100%);
        color: #f8d25c;
        font-weight: 600;
        border-color: rgba(248, 210, 92, 0.4);
        box-shadow: 0 4px 20px rgba(248, 210, 92, 0.2);
    }

    .card {
        border-radius: 20px;
        padding: 1.25rem;
        box-shadow: 0 8px 32px rgba(248, 210, 92, 0.08);
        border: 1px solid rgba(248, 210, 92, 0.15);
        transition: all 0.3s ease;
    }

    .card:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 40px rgba(248, 210, 92, 0.15);
    }

    .btn-primary,
    .btn-secondary {
        border-radius: 16px;
        padding: 0.75rem 1.25rem !important;
        font-size: 0.95rem !important;
        font-weight: 600;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .btn-primary {
        background: linear-gradient(135deg, #f8d25c 0%, #f4c430 100%);
        color: #151514;
        border: none;
        box-shadow: 0 4px 20px rgba(248, 210, 92, 0.3);
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 30px rgba(248, 210, 92, 0.4);
    }

    .btn-secondary {
        background: rgba(255, 255, 255, 0.1);
        color: #FFFFFF;
        border: 1px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(10px);
    }

    .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-1px);
    }

    form input,
    form select,
    form textarea {
        border-radius: 16px;
        padding: 0.875rem 1rem;
        font-size: 1rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(248, 210, 92, 0.2);
        transition: all 0.3s ease;
    }

    form input:focus,
    form select:focus,
    form textarea:focus {
        outline: none;
        border-color: #f8d25c;
        background: rgba(255, 255, 255, 0.08);
        box-shadow: 0 0 0 3px rgba(248, 210, 92, 0.1);
    }

    h1 {
        font-size: 2rem !important;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }

    h3 {
        font-size: 1.25rem !important;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }

    p {
        font-size: 1rem !important;
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .grid-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .section {
        padding: 3rem 0 !important;
    }
}
