/* ========================================
   EVSHOP - Custom Styles
   ======================================== */

/* ---- Scrollbar Hide ---- */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* ---- Line Clamp ---- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Navigation Links ---- */
.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}
.nav-link:hover {
    color: #16a34a;
    background-color: #f0fdf4;
}
.nav-link.active {
    color: #16a34a;
    background-color: #f0fdf4;
    font-weight: 600;
}

/* ---- Navbar Scrolled State ---- */
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
#navbar.scrolled .nav-logo-text {
    color: #0a0f0a;
}

/* ---- Form Input ---- */
.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: #1f2937;
    background-color: #fff;
    transition: all 0.2s ease;
    outline: none;
}
.form-input::placeholder {
    color: #9ca3af;
}
.form-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}
.form-input.border-red-400 {
    border-color: #f87171;
}
.form-input.border-red-400:focus {
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
}

/* ---- Form Error ---- */
.form-error {
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.25rem;
}

/* ---- Product Description (Rich HTML) ---- */
.product-description h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: #0a0f0a;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.product-description h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111a11;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.product-description p {
    color: #4b5563;
    line-height: 1.75;
    margin-bottom: 1rem;
}
.product-description ul,
.product-description ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: #4b5563;
}
.product-description li {
    margin-bottom: 0.375rem;
    line-height: 1.7;
}
.product-description img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 1.5rem 0;
}
.product-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}
.product-description table thead th {
    background-color: #f0fdf4;
    color: #166534;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #bbf7d0;
}
.product-description table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}
.product-description table tbody tr:hover {
    background-color: #f9fafb;
}
.product-description table tbody tr:last-child td {
    border-bottom: none;
}

/* ---- Standalone Specs Table (outside .product-description) ---- */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.specs-table tr:nth-child(even) {
    background-color: #f9fafb;
}
.specs-table td {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}
.specs-table td:first-child {
    font-weight: 600;
    color: #1f2937;
    width: 35%;
    white-space: nowrap;
}
.specs-table td:last-child {
    color: #4b5563;
}
.specs-table tr:last-child td {
    border-bottom: none;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ---- Smooth Scroll ---- */
html {
    scroll-behavior: smooth;
}

/* ---- Selection Color ---- */
::selection {
    background-color: #bbf7d0;
    color: #14532d;
}

/* ---- Focus Visible ---- */
:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---- Mobile Adjustments ---- */
@media (max-width: 640px) {
    .product-description table {
        font-size: 0.8125rem;
    }
    .product-description table thead th,
    .product-description table tbody td {
        padding: 0.5rem 0.625rem;
    }
    .specs-table td {
        padding: 0.625rem 0.75rem;
    }
    .specs-table td:first-child {
        width: 45%;
    }
}