/* ============================================================
   EKOFISH THEME — theme.css (Tailwind CDN version)
   Minimal overrides + mobile-first polish
   ============================================================ */

/* ── PS Core Reset ── */
#header { background: transparent !important; border: none !important; box-shadow: none !important; }
#wrapper { padding-top: 0 !important; }
#wrapper .breadcrumb,
nav.breadcrumb { display: none !important; }
.header-banner { display: none !important; }

/* Hide PS default header elements */
#header .header-nav,
#header .header-top { display: none !important; }

/* ── Featured Products module ── */
.featured-products .products-section-title,
.featured-products h2,
#content .featured-products > h2 { display: none !important; }

/* ── Footer module overrides ── */
footer .block-contact,
footer #block-newsletter { display: none !important; }
footer .footer-container { background: transparent !important; padding: 0 !important; }

/* ── PS linklist in footer ── */
.ek-footer-links .links .collapse { display: block; }
.ek-footer-links .links .h3,
.ek-footer-links .links h3 { display: none; }

/* ── Product flags default override ── */
.product-flags { position: static !important; display: none !important; }

/* ── Blockreassurance hide ── */
#block-reassurance { display: none !important; }

/* ── Sort dropdown ── */
#ek-sort-dropdown .ek-dropdown-menu { display: none; }
#ek-sort-dropdown.open .ek-dropdown-menu { display: block; }

/* ── Faceted search — base reset ── */
#search_filters { background: transparent; border: none; padding: 0; }
/* Price slider (jQuery UI) */
.ui-slider { height: 4px; background: #e5e7eb; border-radius: 4px; border: none; }
.ui-slider .ui-slider-range { background: #22c55e; border-radius: 4px; }
.ui-slider .ui-slider-handle { width: 16px; height: 16px; background: white; border: 2px solid #22c55e; border-radius: 50%; top: -6px; margin-left: -8px; cursor: pointer; outline: none; }
.ui-slider .ui-slider-handle:hover,
.ui-slider .ui-slider-handle:focus { box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }

/* ── Active filters ── */
#js-active-search-filters.hide { display: none; }

/* ── Hide PS columns ── */
#left-column, #right-column { display: none !important; }
#content-wrapper { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; }

/* ── Product page: gray bg ── */
#main.bg-gray-50 { background-color: #f9fafb; }

/* ================================================================
   ANIMATIONS
   ================================================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
@keyframes zoomIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

/* Cart badge pulse when updated */
.cart-badge-pulse {
    animation: pulse-green 0.6s ease;
}

/* Smooth image transitions */
#product-cover-image {
    transition: opacity 0.3s ease;
}

/* ================================================================
   MOBILE RESPONSIVE FIXES
   ================================================================ */

/* Product grid on mobile */
@media (max-width: 639px) {
    .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
    /* Smaller product cards on mobile */
    .product-miniature .bg-white.border { padding: 12px !important; }
    .product-miniature .h-56 { height: 120px !important; }
    .product-miniature .h-44 { height: 100px !important; }
    .product-miniature h4 { font-size: 12px !important; height: 36px !important; }
    .product-miniature .text-2xl { font-size: 16px !important; }
    .product-miniature .flex.gap-2 { flex-direction: column !important; }
    .product-miniature .qty-btn-minus,
    .product-miniature .qty-btn-plus,
    .product-miniature .qty-display { display: none !important; }
    .product-miniature .flex.items-center.border.border-gray-200 { display: none !important; }
    .product-miniature button[data-button-action="add-to-cart"] { border-radius: 8px !important; padding: 8px !important; }
    .product-miniature button[data-button-action="add-to-cart"] span { font-size: 10px !important; }

    /* Hero on mobile */
    .lg\:h-\[650px\] { min-height: 400px !important; }
    .text-6xl { font-size: 2.5rem !important; }
    .lg\:text-8xl { font-size: 2.5rem !important; }

    /* Benefits bar mobile */
    .bg-\[\#ffb400\] .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 24px !important; }

    /* Footer mobile */
    footer .grid.grid-cols-1.md\:grid-cols-4 { grid-template-columns: 1fr !important; }

    /* Cart page mobile */
    .cart-item { flex-direction: row !important; }
    .cart-item .w-24 { width: 72px !important; height: 72px !important; }

    /* Category header on mobile */
    .text-3xl.font-black.uppercase { font-size: 1.5rem !important; }
}

@media (max-width: 1023px) {
    /* Hide desktop benefit cards in hero */
    .grid.grid-cols-2.gap-4.w-full.lg\:w-auto { display: none !important; }
}

/* ================================================================
   PS FORMS — Checkout & Customer
   ================================================================ */

.form-control,
.checkout-steps-container input[type="text"],
.checkout-steps-container input[type="email"],
.checkout-steps-container input[type="password"],
.checkout-steps-container input[type="tel"],
.checkout-steps-container select,
.page-content input[type="text"],
.page-content input[type="email"],
.page-content input[type="password"],
.page-content input[type="tel"],
.page-content select,
.page-content textarea {
    width: 100%;
    padding: 10px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus,
.checkout-steps-container input:focus,
.page-content input:focus,
.page-content select:focus,
.page-content textarea:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Form labels */
.form-group label,
.checkout-steps-container label,
.page-content .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}

/* PS Buttons */
.btn-primary,
.form-footer .btn,
#content .btn-primary,
button[type="submit"].form-control-submit {
    background-color: #22c55e !important;
    border-color: #22c55e !important;
    color: white !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
    letter-spacing: 0.05em !important;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    transition: all 0.2s !important;
}
.btn-primary:hover,
.form-footer .btn:hover,
button[type="submit"].form-control-submit:hover {
    background-color: #1ea34d !important;
    border-color: #1ea34d !important;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3) !important;
}

/* Checkout steps */
.checkout-step {
    background: white;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}
.checkout-step .step-title {
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    color: #1f2937;
    margin-bottom: 16px;
}
.checkout-step .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #22c55e;
    color: white;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    margin-right: 12px;
}
.checkout-step.-current {
    border-color: #22c55e;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
}
.checkout-step.-complete .step-number {
    background: #22c55e;
}

/* Card styling */
.page-content .card,
.page-content .card-block {
    background: white;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    padding: 24px;
}
.page-content .card-title {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 18px;
    color: #1f2937;
}

/* Tables */
.page-content table {
    width: 100%;
    border-collapse: collapse;
}
.page-content table th {
    background: #f9fafb;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7280;
    padding: 10px 12px;
    text-align: left;
}
.page-content table td {
    padding: 12px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}
.page-content table tr:hover td {
    background: #f9fafb;
}

/* Alerts */
.alert-success, .alert.alert-success {
    background: #22c55e10;
    border: 1px solid #22c55e;
    color: #166534;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
}
.alert-danger, .alert.alert-danger {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
}
.alert-warning, .alert.alert-warning {
    background: #fffbeb;
    border: 1px solid #f59e0b;
    color: #92400e;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
}

/* Custom checkbox/radio */
.custom-checkbox input[type="checkbox"],
.custom-radio input[type="radio"] {
    accent-color: #22c55e;
}

/* Links in customer area */
.page-content a:not(.btn) { color: #22c55e; }
.page-content a:not(.btn):hover { color: #1ea34d; text-decoration: underline; }

/* Page header */
.page-header h1 {
    font-size: 28px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* Cart summary */
.cart-grid-right .card {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    padding: 20px;
}

/* ================================================================
   BOOTSTRAP GRID COMPAT (PS forms)
   ================================================================ */

.row { display: flex; flex-wrap: wrap; margin-left: -8px; margin-right: -8px; }
.row > * { padding-left: 8px; padding-right: 8px; }
.col-md-3 { flex: 0 0 100%; max-width: 100%; }
.col-md-6 { flex: 0 0 100%; max-width: 100%; }
.col-md-9 { flex: 0 0 100%; max-width: 100%; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; }
@media (min-width: 768px) {
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
}

/* Form group layout */
.form-group { margin-bottom: 16px; }
.form-group.row { align-items: flex-start; }
.form-control-label { display: block; font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 6px; padding-top: 10px; }
.form-control-label.required::after { content: ' *'; color: #ef4444; }
.form-control-comment { font-size: 11px; color: #9ca3af; margin-top: 4px; display: block; }
.form-footer { margin-top: 20px; }
.form-footer .clearfix::after { content: ''; display: table; clear: both; }

/* PS default text-sm-center */
.text-sm-center { text-align: center; }
@media (min-width: 768px) { .text-sm-center { text-align: left; } }

/* Hidden PS helpers */
.clearfix::after { content: ''; display: table; clear: both; }
.pull-right { float: right; }
.pull-left { float: left; }

/* ================================================================
   AUTHENTICATION PAGE — Premium styling
   ================================================================ */

/* Login/register form wrapper */
.login-form .form-group,
.register-form .form-group {
    margin-bottom: 16px;
}
.login-form .form-group.row,
.register-form .form-group.row {
    flex-direction: column;
}
.login-form .form-group .col-md-3,
.register-form .form-group .col-md-3 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-top: 0;
}
.login-form .form-group .col-md-6,
.register-form .form-group .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
}

.login-form .form-group input,
.register-form .form-group input,
.login-form .form-group select,
.register-form .form-group select {
    padding: 14px 16px !important;
    font-size: 15px !important;
    border-radius: 14px !important;
    background: #f9fafb !important;
}

.login-form .form-group input:focus,
.register-form .form-group input:focus {
    background: white !important;
}

/* Forgot password link */
.forgot-password a {
    color: #22c55e !important;
    font-weight: 600;
    font-size: 13px;
}

/* Password visibility toggle */
.input-group { position: relative; }
.input-group .input-group-btn { position: absolute; right: 0; top: 0; }
.input-group .btn { background: transparent; border: none; padding: 14px 16px; color: #9ca3af; cursor: pointer; }
.input-group .btn:hover { color: #22c55e; }

/* Custom checkbox styling */
.custom-checkbox { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.custom-checkbox input[type="checkbox"] { width: 18px; height: 18px; accent-color: #22c55e; margin-top: 2px; flex-shrink: 0; }
.custom-checkbox label, .custom-checkbox span { font-size: 13px; color: #6b7280; line-height: 1.4; }

/* Custom radio styling */
.custom-radio { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.custom-radio input[type="radio"] { width: 18px; height: 18px; accent-color: #22c55e; flex-shrink: 0; }
.custom-radio label { font-size: 13px; color: #6b7280; }

/* ================================================================
   NEWSLETTER SECTION
   ================================================================ */

.newsletter-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

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

#mobile-menu-panel::-webkit-scrollbar {
    width: 4px;
}
#mobile-menu-panel::-webkit-scrollbar-track {
    background: transparent;
}
#mobile-menu-panel::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

/* ================================================================
   SELECTION COLOR
   ================================================================ */

::selection {
    background: #22c55e;
    color: white;
}

/* ================================================================
   SMOOTH SCROLL
   ================================================================ */

html {
    scroll-behavior: smooth;
}

/* ================================================================
   LOADING ANIMATION for add-to-cart button
   ================================================================ */

.add-to-cart.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}
.add-to-cart.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}
@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}
