
.accordion-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.accordion-header {
    padding: 1rem;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: #f9fafb;
}

.accordion-content {
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-content.open {
    padding: 1rem;
    max-height: 500px;
}

/* ===== TABS ===== */

.tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    padding: 1.5rem 0;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

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

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInUp 0.3s ease-out;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease-out;
}

.modal-content.hidden {
    display: none !important;
}

/* ===== TABLE ===== */

.table-container {
    overflow-x: auto;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f9fafb;
}

th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}

tbody tr:hover {
    background: #f9fafb;
}

/* ===== TOAST NOTIFICATIONS ===== */

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease-out;
    z-index: var(--z-editor-handle-knob, 1000);
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

/* ===== LOADING SPINNER ===== */

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== IMAGE ZOOM ===== */

.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.5s ease;
}

@media (hover: hover) and (pointer: fine) {
    .product-card-image:hover > .product-badge,
    .product-card-image:hover > .absolute {
        opacity: 0.14;
        transform: scale(0.98);
    }

    .product-card-image:hover ~ .product-card-body {
        opacity: 0.18;
        transform: translateY(0.08rem);
    }

    .image-zoom:hover img {
        transform: scale(1.1);
    }
}

@media (hover: none), (pointer: coarse) {
    .product-card.is-preview-active .product-card-image > .product-badge,
    .product-card.is-preview-active .product-card-image > .absolute,
    .product-card-image.is-preview-active > .product-badge,
    .product-card-image.is-preview-active > .absolute {
        opacity: 0.14;
        transform: scale(0.98);
    }

    .product-card.is-preview-active .product-card-body,
    .product-card-image.is-preview-active ~ .product-card-body {
        opacity: 0.18;
        transform: translateY(0.08rem);
    }

    .product-card.is-preview-active .image-zoom img,
    .image-zoom.is-preview-active img {
        transform: scale(1.1);
    }
}

.image-zoom:focus-visible {
    outline: 2px solid rgba(148, 163, 184, 0.55);
    outline-offset: -2px;
}

/* ===== PRICE TAG ===== */

.price-tag {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.price-old {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 1rem;
}

/* ===== QUANTITY SELECTOR ===== */

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.quantity-btn {
    padding: 0.5rem 1rem;
    background: #f9fafb;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.quantity-btn:hover {
    background: #e5e7eb;
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: none;
    padding: 0.5rem;
}

/* ===== BREADCRUMB ===== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.product-breadcrumb {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.product-breadcrumb::-webkit-scrollbar {
    display: none;
}

.product-breadcrumb > * {
    flex: 0 0 auto;
}

body[data-analytics-event="view_product"] .product-mobile-back {
    color: #475569;
}

body[data-analytics-event="view_product"] .product-info-summary::-webkit-details-marker {
    display: none;
}

body[data-analytics-event="view_product"] .product-info-chevron {
    transition: transform 0.18s ease;
}

body[data-analytics-event="view_product"] .product-info-panel[open] .product-info-chevron {
    transform: rotate(180deg);
}

body[data-analytics-event="view_product"] .product-buying-note,
body[data-analytics-event="view_product"] .product-detail-list-row,
body[data-analytics-event="view_product"] .product-related-card .flex {
    flex-direction: row !important;
}

body[data-analytics-event="view_product"] .product-hero-trust {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

body[data-analytics-event="view_product"] .product-hero-trust-title {
    letter-spacing: -0.01em;
}

@media (min-width: 1024px) {
    body[data-analytics-event="view_product"] .product-detail-hero > .product-hero-media {
        grid-column: 1;
        grid-row: 1;
    }

    body[data-analytics-event="view_product"] .product-detail-hero > .product-hero-trust {
        grid-column: 1;
        grid-row: 2;
        margin-top: 0.9rem !important;
        align-self: start;
    }

    body[data-analytics-event="view_product"] .product-detail-hero > .product-hero-copy {
        grid-column: 2;
        grid-row: 1 / span 2;
    }
}

.breadcrumb a:hover {
    color: var(--primary);
}

/* ===== PAGINATION ===== */

.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn[disabled],
.page-btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
}

.page-btn[disabled]:hover,
.page-btn[aria-disabled="true"]:hover {
    background: white;
    color: inherit;
    border-color: #e5e7eb;
}

/* ===== PRODUCT QUICK VIEW ===== */

.quick-view-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.quick-view-content {
    background: white;
    border-radius: 1rem;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease-out;
}

/* ===== IMAGE GALLERY ===== */

.image-gallery {
    display: grid;
    gap: 0.5rem;
}

.image-gallery-main {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
}

.image-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
}

.image-gallery-thumb {
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.image-gallery-thumb:hover,
.image-gallery-thumb.active {
    border-color: var(--primary);
}

/* ===== DROPDOWN ===== */

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 50;
    display: none;
    animation: fadeInUp 0.2s ease-out;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.dropdown-item:hover {
    background: #f9fafb;
}

/* ===== ALERT ===== */

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

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

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* ===== RATING STARS ===== */

.rating {
    display: flex;
    gap: 0.25rem;
    color: #fbbf24;
}

/* ===== CHIP/TAG ===== */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.chip-removable {
    cursor: pointer;
    transition: background 0.3s ease;
}

.chip-removable:hover {
    background: #e5e7eb;
}

/* ===== FILTER & SORT ===== */

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== ADMIN PANEL ===== */

.admin-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.admin-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== FORMS ===== */

.form-input {
    width: 100%;
    padding: 0.82rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 0.97rem;
    color: var(--text-main);
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.16);
    background: #ffffff;
}

.checkout-phone-field {
    display: flex;
    align-items: stretch;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.checkout-phone-field:focus-within {
    border-color: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.16);
}

.checkout-phone-country-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex: 0 0 auto;
    min-width: 6rem;
    padding: 0 0.8rem;
    border: 0;
    border-right: 1px solid var(--line);
    background: #f8fafc;
    color: #0f172a;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.checkout-tax-field .checkout-phone-country-btn {
    min-width: 5.25rem;
}

.checkout-phone-country-btn:hover,
.checkout-phone-country-btn:focus-visible {
    background: #eef2f7;
}

.checkout-phone-country-btn:focus-visible {
    outline: 2px solid #94a3b8;
    outline-offset: -2px;
}

.checkout-phone-country-btn:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.checkout-phone-flag {
    display: inline-flex;
    width: 1.75rem;
    height: 1.15rem;
    overflow: hidden;
    border-radius: 0.2rem;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.checkout-phone-flag svg {
    display: block;
    width: 100%;
    height: 100%;
}

.checkout-phone-dial {
    font-size: 0.9rem;
    letter-spacing: 0;
}

.checkout-phone-input.form-input {
    min-width: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.checkout-phone-input.form-input:focus {
    border-color: transparent;
    box-shadow: none;
}