/**
 * SpoCommerce Frontend Styles
 * Modern, clean design for digital product store.
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    --spo-primary: #2563eb;
    --spo-primary-hover: #1d4ed8;
    --spo-primary-light: #dbeafe;
    --spo-success: #16a34a;
    --spo-success-light: #dcfce7;
    --spo-warning: #f59e0b;
    --spo-warning-light: #fef3c7;
    --spo-danger: #dc2626;
    --spo-danger-light: #fee2e2;
    --spo-info: #0891b2;
    --spo-info-light: #cffafe;
    --spo-text: #1e293b;
    --spo-text-light: #64748b;
    --spo-text-muted: #94a3b8;
    --spo-border: #e2e8f0;
    --spo-bg: #ffffff;
    --spo-bg-alt: #f8fafc;
    --spo-bg-hover: #f1f5f9;
    --spo-radius: 8px;
    --spo-radius-lg: 12px;
    --spo-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --spo-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --spo-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --spo-transition: 0.2s ease;
    --spo-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==========================================================================
   Base
   ========================================================================== */

.spo-commerce-page {
    font-family: var(--spo-font);
    color: var(--spo-text);
    line-height: 1.6;
}

.spo-commerce-page *,
.spo-commerce-page *::before,
.spo-commerce-page *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.spo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    border: 2px solid transparent;
    border-radius: var(--spo-radius);
    cursor: pointer;
    transition: all var(--spo-transition);
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--spo-font);
}

.spo-btn:hover {
    text-decoration: none;
}

.spo-btn-primary {
    background: var(--spo-primary);
    color: #fff;
    border-color: var(--spo-primary);
}

.spo-btn-primary:hover {
    background: var(--spo-primary-hover);
    border-color: var(--spo-primary-hover);
    color: #fff;
}

.spo-btn-outline {
    background: transparent;
    color: var(--spo-primary);
    border-color: var(--spo-primary);
}

.spo-btn-outline:hover {
    background: var(--spo-primary);
    color: #fff;
}

.spo-btn-link {
    background: transparent;
    color: var(--spo-primary);
    border: none;
    padding: 10px 12px;
}

.spo-btn-link:hover {
    color: var(--spo-primary-hover);
    text-decoration: underline;
}

.spo-btn-block {
    display: flex;
    width: 100%;
}

.spo-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.spo-btn-sm {
    padding: 9px 20px;
    font-size: 1rem;
}

.spo-btn-xs {
    padding: 4px 10px;
    font-size: 12px;
}

.spo-btn:disabled,
.spo-btn.spo-loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================================================
   Notices
   ========================================================================== */

.spo-notice {
    padding: 12px 16px;
    border-radius: var(--spo-radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.spo-notice-info {
    background: var(--spo-info-light);
    color: var(--spo-info);
    border: 1px solid currentColor;
}

.spo-notice-success {
    background: var(--spo-success-light);
    color: var(--spo-success);
    border: 1px solid currentColor;
}

.spo-notice-error {
    background: var(--spo-danger-light);
    color: var(--spo-danger);
    border: 1px solid currentColor;
}

.spo-notice-warning {
    background: var(--spo-warning-light);
    color: var(--spo-warning);
    border: 1px solid currentColor;
}

.spo-notice a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

/* Toast notifications */
.spo-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    padding: 14px 20px;
    border-radius: var(--spo-radius);
    box-shadow: var(--spo-shadow-lg);
    font-size: 14px;
    font-weight: 500;
    max-width: 360px;
    animation: spoSlideIn 0.3s ease;
}

.spo-toast-success {
    background: var(--spo-success);
    color: #fff;
}

.spo-toast-error {
    background: var(--spo-danger);
    color: #fff;
}

@keyframes spoSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

@keyframes spoSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}

/* ==========================================================================
   Forms
   ========================================================================== */

.spo-form label,
.spo-checkout-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--spo-text);
}

.spo-form .required,
.spo-checkout-form .required {
    color: var(--spo-danger);
}

.spo-form input[type="text"],
.spo-form input[type="email"],
.spo-form input[type="tel"],
.spo-form input[type="password"],
.spo-form input[type="number"],
.spo-form textarea,
.spo-form select,
.spo-checkout-form input[type="text"],
.spo-checkout-form input[type="email"],
.spo-checkout-form input[type="tel"],
.spo-checkout-form input[type="password"],
.spo-checkout-form input[type="number"],
.spo-checkout-form textarea,
.spo-checkout-form select {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius);
    background: var(--spo-bg);
    color: var(--spo-text);
    transition: border-color var(--spo-transition), box-shadow var(--spo-transition);
    font-family: var(--spo-font);
}

.spo-form input:focus,
.spo-form textarea:focus,
.spo-form select:focus,
.spo-checkout-form input:focus,
.spo-checkout-form textarea:focus,
.spo-checkout-form select:focus {
    outline: none;
    border-color: var(--spo-primary);
    box-shadow: 0 0 0 3px var(--spo-primary-light);
}

.spo-form-field {
    margin-bottom: 16px;
}

.spo-form-row {
    margin-bottom: 0;
}

.spo-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.spo-form-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spo-form-inline label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
}

.spo-form-actions {
    margin-top: 24px;
}

.spo-form-message {
    padding: 10px 14px;
    border-radius: var(--spo-radius);
    margin-bottom: 16px;
    font-size: 13px;
}

.spo-form-message.spo-error {
    background: var(--spo-danger-light);
    color: var(--spo-danger);
}

.spo-form-message.spo-success {
    background: var(--spo-success-light);
    color: var(--spo-success);
}

.spo-help-text {
    font-size: 13px;
    color: var(--spo-text-light);
    margin: 4px 0 12px;
}

/* ==========================================================================
   Shop
   ========================================================================== */

.spo-shop-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--spo-bg-alt);
    border-radius: var(--spo-radius-lg);
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.spo-shop-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.spo-shop-search {
    display: flex;
    gap: 8px;
}

.spo-search-input {
    padding: 8px 14px;
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius);
    font-size: 14px;
    min-width: 200px;
    font-family: var(--spo-font);
}

.spo-search-input:focus {
    outline: none;
    border-color: var(--spo-primary);
    box-shadow: 0 0 0 3px var(--spo-primary-light);
}

.spo-shop-category-filter select,
.spo-shop-sort select {
    padding: 8px 14px;
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius);
    font-size: 14px;
    background: var(--spo-bg);
    font-family: var(--spo-font);
}

.spo-shop-result-count {
    font-size: 13px;
    color: var(--spo-text-light);
    white-space: nowrap;
}

.spo-shop-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
}

.spo-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--spo-primary-light);
    color: var(--spo-primary);
    border-radius: 20px;
    font-size: 13px;
}

.spo-filter-tag a {
    color: var(--spo-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
}

.spo-clear-filters {
    font-size: 13px;
    color: var(--spo-text-light);
}

/* Product Grid */
.spo-product-grid {
    display: grid;
    gap: 24px;
}

.spo-cols-2 { grid-template-columns: repeat(2, 1fr); }
.spo-cols-3 { grid-template-columns: repeat(3, 1fr); }
.spo-cols-4 { grid-template-columns: repeat(4, 1fr); }

.spo-product-card {
    position: relative;
    background: var(--spo-bg);
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius-lg);
    overflow: hidden;
    /*box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;*/
    transition: box-shadow var(--spo-transition), transform var(--spo-transition);
    box-shadow: rgba(0, 0, 0, 0.45) 0px 25px 20px -20px;
}

.spo-product-card:hover {
    box-shadow: var(--spo-shadow-md);
    transform: translateY(-2px);
}

.spo-product-card .spo-badge {
    position: absolute;
    top: 8px;
    z-index: 1;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.spo-badge-sale {
    left: 12px;
    background: var(--spo-danger);
    color: #fff;
}

.spo-badge-subscription {
    right: 8px;
    /* background: var(--spo-primary); */
    background: #000000;
    color: #fff;
}

.spo-product-image-link {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--spo-bg-alt);
}

.spo-product-card .spo-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.spo-product-card:hover .spo-product-image {
    transform: scale(1.05);
}

.spo-product-info {
    padding: 16px;
}

.spo-product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.3;
}

.spo-product-title a {
    color: var(--spo-text);
    text-decoration: none;
}

.spo-product-title a:hover {
    color: var(--spo-primary);
}

.spo-product-excerpt {
    font-size: 13px;
    color: var(--spo-text-light);
    margin: 0 0 12px;
    line-height: 1.5;
}

.spo-product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.spo-price-old {
    text-decoration: line-through;
    color: var(--spo-text-muted);
    font-size: 14px;
}

.spo-price-current {
    font-size: 18px;
    font-weight: 700;
    color: var(--spo-text);
}

.spo-price-large {
    font-size: 28px;
}

.spo-price-period {
    font-size: 13px;
    color: var(--spo-text-light);
    font-weight: 400;
}

.spo-product-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.spo-no-products {
    text-align: center;
    padding: 60px 20px;
    color: var(--spo-text-light);
}

/* Pagination */
.spo-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 32px;
}

.spo-pagination a,
.spo-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius);
    font-size: 14px;
    color: var(--spo-text);
    text-decoration: none;
    transition: all var(--spo-transition);
}

.spo-pagination a:hover {
    background: var(--spo-primary-light);
    border-color: var(--spo-primary);
    color: var(--spo-primary);
}

.spo-pagination .current {
    background: var(--spo-primary);
    border-color: var(--spo-primary);
    color: #fff;
}

/* ==========================================================================
   Single Product
   ========================================================================== */

.spo-breadcrumb {
    font-size: 13px;
    color: var(--spo-text-light);
    margin-bottom: 24px;
}

.spo-breadcrumb a {
    color: var(--spo-text-light);
    text-decoration: none;
}

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

.spo-breadcrumb-sep {
    margin: 0 6px;
    color: var(--spo-text-muted);
}

/* --- Product Detail Layout --- */

.spo-product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* --- Gallery --- */

.spo-product-gallery {
    position: sticky;
    top: 20px;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-self: start;
}

.spo-product-gallery.spo-gallery-single {
    grid-template-columns: 1fr;
}

.spo-gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 480px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.spo-gallery-thumb {
    width: 64px;
    height: 64px;
    padding: 0;
    border: 2px solid var(--spo-border);
    border-radius: var(--spo-radius);
    overflow: hidden;
    cursor: pointer;
    background: var(--spo-bg-alt);
    flex-shrink: 0;
    transition: border-color var(--spo-transition);
}

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

.spo-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.spo-gallery-main {
    position: relative;
    border-radius: var(--spo-radius-lg);
    overflow: hidden;
    background: var(--spo-bg-alt);
}

.spo-gallery-viewport {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.spo-gallery-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.35s ease;
}

.spo-gallery-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}

.spo-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.spo-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--spo-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all var(--spo-transition);
    color: var(--spo-text);
    padding: 0;
}

.spo-gallery-nav:hover {
    background: #fff;
    box-shadow: var(--spo-shadow-md);
}

.spo-gallery-prev {
    left: 8px;
}

.spo-gallery-next {
    right: 8px;
}

.spo-gallery-fullscreen {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: var(--spo-radius);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--spo-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all var(--spo-transition);
    color: var(--spo-text);
    padding: 0;
}

.spo-gallery-fullscreen:hover {
    background: #fff;
    box-shadow: var(--spo-shadow-md);
}

.spo-gallery-dots {
    display: none;
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    gap: 6px;
    z-index: 2;
}

.spo-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.25);
    padding: 0;
    cursor: pointer;
    transition: all var(--spo-transition);
}

.spo-gallery-dot.active {
    background: var(--spo-primary);
    width: 20px;
    border-radius: 4px;
}

/* --- Product Summary --- */

.spo-product-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.spo-single-product .spo-product-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
}

.spo-product-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.spo-category-tag {
    display: inline-block;
    padding: 2px 10px;
    background: var(--spo-bg-alt);
    border: 1px solid var(--spo-border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--spo-text-light);
    text-decoration: none;
}

.spo-category-tag:hover {
    border-color: var(--spo-primary);
    color: var(--spo-primary);
}

.spo-product-price-block {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.spo-discount-badge {
    padding: 2px 8px;
    background: var(--spo-danger-light);
    color: var(--spo-danger);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
}

.spo-subscription-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--spo-info-light);
    border-radius: var(--spo-radius);
    font-size: 13px;
    color: var(--spo-info);
}

.spo-subscription-info svg {
    flex-shrink: 0;
}

.spo-product-short-desc {
    font-size: 15px;
    color: var(--spo-text-light);
    line-height: 1.7;
}

.spo-product-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 0;
}

.spo-product-add-to-cart {
    width: 100%;
}

.spo-btn-block {
    display: flex;
    width: 100%;
}

.spo-product-meta-info {
    font-size: 13px;
    color: var(--spo-text-light);
}

.spo-meta-label {
    font-weight: 600;
    color: var(--spo-text);
}

.spo-payment-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--spo-success-light);
    border-radius: var(--spo-radius);
    font-size: 13px;
    color: var(--spo-success);
}

.spo-pix-icon {
    width: 24px;
    height: 24px;
}

/* --- Characteristics Table (Table Layout) --- */

.spo-product-characteristics {
    border-top: 1px solid var(--spo-border);
    padding-top: 32px;
    margin-bottom: 32px;
}

.spo-product-characteristics h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
}

.spo-chars-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.spo-characteristics-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius-lg);
    overflow: hidden;
    font-size: 14px;
}

.spo-characteristics-table thead th {
    background: var(--spo-primary);
    color: #fff;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.spo-characteristics-table tbody tr:nth-child(even) {
    background: var(--spo-bg-alt);
}

.spo-characteristics-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.03);
}

.spo-characteristics-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--spo-border);
    color: var(--spo-text);
    vertical-align: middle;
}

.spo-characteristics-table tbody tr:last-child td {
    border-bottom: none;
}

.spo-chars-cell-img {
    max-width: 80px;
    max-height: 60px;
    border-radius: 4px;
    object-fit: contain;
    vertical-align: middle;
}

.spo-chars-cell-link {
    color: var(--spo-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--spo-transition);
}

.spo-chars-cell-link:hover {
    color: var(--spo-primary-hover);
    text-decoration: underline;
}

/* --- Characteristics Cards Layout --- */

.spo-chars-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.spo-chars-card {
    background: #fff;
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: box-shadow var(--spo-transition);
}

.spo-chars-card:hover {
    box-shadow: var(--spo-shadow-md);
}

.spo-chars-card-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.spo-chars-card-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--spo-text-muted);
}

.spo-chars-card-value {
    font-size: 14px;
    color: var(--spo-text);
    font-weight: 500;
}

.spo-chars-card-value .spo-chars-cell-img {
    max-width: 100%;
    max-height: 80px;
}

/* --- Description with Expand/Collapse --- */

.spo-product-description {
    border-top: 1px solid var(--spo-border);
    padding-top: 32px;
    margin-bottom: 32px;
}

.spo-product-description h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
}

.spo-description-wrapper {
    position: relative;
}

.spo-description-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--spo-text);
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.spo-description-content p {
    margin: 0 0 16px;
}

.spo-description-content h1,
.spo-description-content h2,
.spo-description-content h3,
.spo-description-content h4,
.spo-description-content h5,
.spo-description-content h6 {
    margin: 24px 0 12px;
    line-height: 1.3;
    color: var(--spo-text);
}

.spo-description-content h2 { font-size: 22px; }
.spo-description-content h3 { font-size: 18px; }
.spo-description-content h4 { font-size: 16px; }

.spo-description-content ul,
.spo-description-content ol {
    padding-left: 24px;
    margin: 0 0 16px;
}

.spo-description-content li {
    margin-bottom: 6px;
    line-height: 1.7;
}

.spo-description-content blockquote {
    border-left: 4px solid var(--spo-primary);
    margin: 16px 0;
    padding: 12px 20px;
    background: var(--spo-bg-alt);
    border-radius: 0 var(--spo-radius) var(--spo-radius) 0;
    font-style: italic;
    color: var(--spo-text-light);
}

.spo-description-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--spo-radius);
    margin: 8px 0;
}

.spo-description-content a {
    color: var(--spo-primary);
    text-decoration: underline;
}

.spo-description-content a:hover {
    color: var(--spo-primary-hover);
}

.spo-description-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.spo-description-content table th,
.spo-description-content table td {
    padding: 8px 12px;
    border: 1px solid var(--spo-border);
    text-align: left;
}

.spo-description-content table th {
    background: var(--spo-bg-alt);
    font-weight: 600;
}

.spo-description-content pre {
    background: var(--spo-bg-alt);
    padding: 16px;
    border-radius: var(--spo-radius);
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
}

.spo-description-content code {
    background: var(--spo-bg-alt);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}

.spo-description-collapsed {
    max-height: 200px;
}

.spo-description-expanded {
    max-height: none;
}

.spo-description-fade {
    position: absolute;
    bottom: 36px;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, var(--spo-bg));
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.spo-description-expanded + .spo-description-fade {
    opacity: 0;
}

.spo-description-toggle {
    display: inline-block;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--spo-primary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.spo-description-toggle:hover {
    text-decoration: underline;
}

.spo-btn-link {
    background: none;
    border: none;
    color: var(--spo-primary);
    padding: 0;
    font-weight: 600;
}

.spo-btn-link:hover {
    text-decoration: underline;
    color: var(--spo-primary-hover);
}

/* --- Related Products --- */

.spo-related-products {
    border-top: 1px solid var(--spo-border);
    padding-top: 32px;
    margin-bottom: 32px;
}

.spo-related-products h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
}

.spo-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.spo-related-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--spo-text);
    transition: box-shadow var(--spo-transition), transform var(--spo-transition);
}

.spo-related-card:hover {
    box-shadow: var(--spo-shadow-md);
    transform: translateY(-2px);
}

.spo-related-card-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--spo-bg-alt);
}

.spo-related-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.spo-related-card:hover .spo-related-card-image img {
    transform: scale(1.05);
}

.spo-related-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.spo-related-card-cat {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--spo-primary);
    font-weight: 600;
}

.spo-related-card-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.spo-related-card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--spo-text);
    margin-top: 4px;
}

/* --- Lightbox/Fullscreen Modal --- */

.spo-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spo-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}

.spo-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spo-lightbox-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 85vh;
}

.spo-lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--spo-radius);
    -webkit-user-select: none;
    user-select: none;
}

.spo-lightbox-close {
    position: absolute;
    top: -40px;
    right: -10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--spo-transition);
    padding: 0;
    z-index: 3;
}

.spo-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.spo-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--spo-transition);
    padding: 0;
    z-index: 3;
}

.spo-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.spo-lightbox-prev {
    left: -60px;
}

.spo-lightbox-next {
    right: -60px;
}

.spo-lightbox-counter {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    white-space: nowrap;
}

/* ==========================================================================
   Cart
   ========================================================================== */

.spo-cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.spo-cart-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.spo-cart-empty h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.spo-cart-empty p {
    color: var(--spo-text-light);
    margin-bottom: 20px;
}

.spo-cart-header {
    display: grid;
    grid-template-columns: 1fr 120px 50px;
    gap: 16px;
    padding: 12px 16px;
    background: var(--spo-bg-alt);
    border-radius: var(--spo-radius);
    font-size: 13px;
    font-weight: 600;
    color: var(--spo-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spo-cart-item {
    display: grid;
    grid-template-columns: 1fr 120px 50px;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--spo-border);
}

.spo-cart-col-product {
    display: flex;
    gap: 12px;
    align-items: center;
}

.spo-cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--spo-radius);
    flex-shrink: 0;
}

.spo-cart-item-name {
    font-weight: 600;
    color: var(--spo-text);
    text-decoration: none;
    font-size: 14px;
}

.spo-cart-item-name:hover {
    color: var(--spo-primary);
}

.spo-cart-item-type {
    display: block;
    font-size: 12px;
    color: var(--spo-text-muted);
}

.spo-cart-col-price {
    font-weight: 600;
    font-size: 15px;
}

.spo-btn-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--spo-border);
    border-radius: 50%;
    background: transparent;
    color: var(--spo-text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: all var(--spo-transition);
}

.spo-btn-remove:hover {
    background: var(--spo-danger-light);
    border-color: var(--spo-danger);
    color: var(--spo-danger);
}

.spo-cart-summary {
    margin-top: 24px;
    padding: 24px;
    background: var(--spo-bg-alt);
    border-radius: var(--spo-radius-lg);
}

.spo-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--spo-border);
}

.spo-cart-total-label {
    font-size: 18px;
    font-weight: 600;
}

.spo-cart-total-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--spo-text);
}

.spo-cart-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ==========================================================================
   Checkout
   ========================================================================== */

.spo-checkout-columns {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: start;
    background: white;
    padding: 10px;
    border: 1px solid silver;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
}

.spo-checkout-billing h2,
.spo-checkout-review h2 {
    font-size: 20px;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--spo-border);
}

.spo-checkout-quick-register {
    margin-top: 20px;
    padding: 16px;
    background: var(--spo-bg-alt);
    border-radius: var(--spo-radius);
}

.spo-checkout-quick-register h3 {
    font-size: 16px;
    margin: 0 0 4px;
}

.spo-order-review {
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.spo-order-review-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--spo-bg-alt);
    font-size: 13px;
    font-weight: 600;
    color: var(--spo-text-light);
    text-transform: uppercase;
}

.spo-order-review-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--spo-border);
    font-size: 14px;
}

.spo-review-item-name {
    display: flex;
    align-items: center;
    gap: 6px;
}

.spo-tag-sub {
    display: inline-block;
    padding: 1px 6px;
    background: var(--spo-primary-light);
    color: var(--spo-primary);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.spo-order-review-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--spo-bg-alt);
    font-weight: 700;
    font-size: 16px;
}

.spo-total-value {
    color: var(--spo-text);
}

.spo-payment-method-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid var(--spo-primary);
    border-radius: var(--spo-radius);
    background: var(--spo-primary-light);
    margin-bottom: 20px;
}

.spo-payment-method-option p {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--spo-text-light);
}

.spo-checkout-empty {
    text-align: center;
    padding: 40px 20px;
}

/* Checkout Auth Flow (not logged in) */
.spo-checkout-auth-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: var(--spo-bg);
    border: 1px solid var(--spo-primary);
    border-radius: var(--spo-radius-lg);
    box-shadow: var(--spo-shadow-md);
}

.spo-checkout-auth-container h2 {
    font-size: 22px;
    margin: 0 0 6px;
    color: var(--spo-text);
}

.spo-auth-subtitle {
    font-size: 14px;
    color: var(--spo-text-light);
    margin: 0 0 24px;
}

.spo-auth-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
}

.spo-auth-buttons .spo-btn {
    padding: 14px 24px;
    font-size: 15px;
}

.spo-auth-section {
    background: var(--spo-bg-alt);
    padding: 24px;
    border-radius: var(--spo-radius);
    margin-top: 16px;
}

.spo-auth-section h3 {
    font-size: 18px;
    margin: 0 0 16px;
}

.spo-auth-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--spo-text);
}

.spo-auth-section .required {
    color: var(--spo-danger);
}

.spo-auth-section input[type="text"],
.spo-auth-section input[type="email"],
.spo-auth-section input[type="tel"],
.spo-auth-section input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius);
    background: var(--spo-bg);
    color: var(--spo-text);
    transition: border-color var(--spo-transition), box-shadow var(--spo-transition);
    font-family: var(--spo-font);
}

.spo-auth-section input:focus {
    outline: none;
    border-color: var(--spo-primary);
    box-shadow: 0 0 0 3px var(--spo-primary-light);
}

.spo-info-box {
    background: var(--spo-info-light);
    padding: 12px 16px;
    border-radius: var(--spo-radius);
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--spo-info);
    line-height: 1.5;
}

.spo-auth-message {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: var(--spo-radius);
    font-size: 14px;
    display: none;
}

.spo-auth-message:not(:empty) {
    display: block;
}

.spo-msg-success {
    background: var(--spo-success-light);
    color: var(--spo-success);
}

.spo-msg-error {
    background: var(--spo-danger-light);
    color: var(--spo-danger);
}

.spo-msg-error a {
    color: var(--spo-danger);
    font-weight: 600;
    text-decoration: underline;
}

.spo-auth-notice {
    text-align: center;
    font-size: 14px;
    color: var(--spo-text-light);
    margin-top: 16px;
}

/* ==========================================================================
   PIX Payment
   ========================================================================== */

.spo-payment {
    max-width: 560px;
    margin: 0 auto;
}

.spo-payment-header {
    text-align: center;
    margin-bottom: 10px;
}

.spo-payment-header h2 {
    font-size: 22px;
    margin: 0 0 8px;
}

.spo-order-number {
    font-size: 14px;
    color: var(--spo-text-light);
}

.spo-payment-summary {
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius);
    margin-bottom: 10px;
    overflow: hidden;
}

.spo-payment-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--spo-border);
}

.spo-payment-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
    font-weight: 700;
    font-size: 16px;
    background: var(--spo-bg-alt);
}

.spo-pix-container {
    text-align: center;
    padding: 32px 24px;
    background: var(--spo-bg-alt);
    border-radius: var(--spo-radius-lg);
}

.spo-pix-loading {
    padding: 40px 0;
}

.spo-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--spo-border);
    border-top-color: var(--spo-primary);
    border-radius: 50%;
    animation: spoSpin 0.8s linear infinite;
}

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

.spo-qr-image-wrapper {
    display: inline-block;
    padding: 16px;
    background: #fff;
    border-radius: var(--spo-radius);
    box-shadow: var(--spo-shadow);
    margin-bottom: 16px;
}

.spo-qr-image {
    width: 240px;
    height: 240px;
    display: block;
}

.spo-pix-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--spo-text);
    margin-bottom: 20px;
}

.spo-pix-code-wrapper {
    margin-bottom: 16px;
}

.spo-pix-code-wrapper label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--spo-text-light);
}

.spo-pix-code {
    display: flex;
    gap: 8px;
    max-width: 420px;
    margin: 0 auto;
}

.spo-pix-code input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius);
    font-size: 12px;
    font-family: monospace;
    background: #fff;
}

.spo-pix-instructions {
    font-size: 14px;
    color: var(--spo-text-light);
    margin-bottom: 16px;
}

.spo-pix-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    color: var(--spo-warning);
    font-weight: 600;
}

.spo-timer-icon {
    font-size: 16px;
}

.spo-payment-checking {
    text-align: center;
    padding: 16px;
    font-size: 14px;
    color: var(--spo-text-light);
}

.spo-pulse {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--spo-success);
    border-radius: 50%;
    margin-bottom: 8px;
    animation: spoPulse 1.5s ease-in-out infinite;
}

@keyframes spoPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(1.3); }
}

.spo-pix-status {
    padding: 32px;
}

.spo-status-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   QR Code Total (compact template)
   -------------------------------------------------------------------------- */

.spo-pix-qr-total {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--spo-text);
}

.spo-qr-total-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--spo-text-light);
}

.spo-qr-total-value {
    color: var(--spo-success);
    font-size: 22px;
}

/* --------------------------------------------------------------------------
   Classic PIX Template
   -------------------------------------------------------------------------- */

.spo-payment-classic .spo-payment-header {
    background: var(--spo-bg-alt);
    padding: 16px;
    border-radius: var(--spo-radius) var(--spo-radius) 0 0;
    border-bottom: 1px solid var(--spo-border);
}

.spo-payment-classic .spo-payment-header h2 {
    font-size: 18px;
    margin: 0;
    font-weight: 600;
}

.spo-pix-classic {
    background: var(--spo-bg);
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius-lg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 0;
}

.spo-classic-values {
    padding: 20px 24px 0;
    text-align: center;
}

.spo-classic-value-row {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.spo-classic-label {
    font-size: 14px;
    color: var(--spo-text-light);
    font-weight: 500;
}

.spo-classic-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--spo-text);
}

.spo-classic-amount-pix {
    color: var(--spo-success);
    font-size: 20px;
}

.spo-qr-classic-wrapper {
    padding: 24px;
    background: #fff;
    margin: 20px auto;
    max-width: 300px;
    border-radius: var(--spo-radius);
    border: 1px solid var(--spo-border);
}

.spo-qr-image-classic {
    width: 280px;
    height: 280px;
}

.spo-pix-code-classic {
    padding: 0 24px 16px;
}

.spo-pix-code-classic label {
    text-align: left;
}

.spo-pix-code-classic-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
    max-width: none;
}

.spo-pix-textarea {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius);
    font-size: 11px;
    font-family: monospace;
    background: #fff;
    resize: none;
}

.spo-copy-classic {
    white-space: nowrap;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: var(--spo-radius);
    align-self: center;
}

.spo-classic-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid var(--spo-border);
    background: var(--spo-bg-alt);
    border-radius: 0 0 var(--spo-radius-lg) var(--spo-radius-lg);
}

.spo-classic-timer-label {
    font-size: 13px;
    color: var(--spo-text-light);
}

.spo-classic-timer-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--spo-success);
    margin-left: 4px;
}

.spo-classic-checking {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--spo-text-light);
}

/* No-link product card image */
.spo-product-image-link.spo-no-link {
    cursor: default;
    display: block;
}

@media (max-width: 480px) {
    .spo-pix-code-classic-row {
        flex-direction: column;
    }
    .spo-classic-footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .spo-qr-image-classic {
        width: 220px;
        height: 220px;
    }
    
.spo-btn-sm {
    padding: 6px 14px;
    font-size: 0.9rem;
}
}

/* ==========================================================================
   Order Received
   ========================================================================== */

.spo-order-received {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.spo-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--spo-success-light);
    color: var(--spo-success);
    font-size: 40px;
    margin-bottom: 16px;
}

.spo-order-received h2 {
    font-size: 24px;
    margin: 0 0 8px;
}

.spo-thank-you {
    font-size: 15px;
    color: var(--spo-text-light);
    margin-bottom: 24px;
}

.spo-order-details-box {
    text-align: left;
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.spo-order-details-box h3 {
    font-size: 18px;
    margin: 0 0 16px;
}

.spo-order-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.spo-order-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.spo-order-info-item .spo-label {
    font-size: 12px;
    color: var(--spo-text-muted);
    text-transform: uppercase;
}

.spo-order-info-item .spo-value {
    font-size: 15px;
    font-weight: 600;
}

.spo-order-items-list h4 {
    font-size: 14px;
    margin: 0 0 8px;
    padding-top: 16px;
    border-top: 1px solid var(--spo-border);
}

.spo-order-item-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.spo-order-received-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   Account
   ========================================================================== */

.spo-account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--spo-border);
}

.spo-account-header h2 {
    margin: 0;
    font-size: 22px;
}

.spo-logout-link {
    font-size: 14px;
    color: var(--spo-text-light);
    text-decoration: none;
}

.spo-logout-link:hover {
    color: var(--spo-danger);
}

.spo-account-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
}

.spo-account-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spo-account-nav-item {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--spo-text);
    text-decoration: none;
    border-radius: var(--spo-radius);
    transition: all var(--spo-transition);
}

.spo-account-nav-item:hover {
    background: var(--spo-bg-hover);
    color: var(--spo-primary);
}

.spo-account-nav-item.spo-active {
    background: var(--spo-primary-light);
    color: var(--spo-primary);
    font-weight: 600;
}

.spo-account-content {
    min-width: 0;
}

/* Dashboard cards */
.spo-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.spo-dashboard-card {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 20px;
    background: var(--spo-bg);
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius-lg);
}

.spo-card-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.spo-card-content h4 {
    font-size: 13px;
    font-weight: 500;
    color: var(--spo-text-light);
    margin: 0 0 4px;
}

.spo-card-value {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.spo-user-type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.spo-type-visitor     { background: var(--spo-bg-alt); color: var(--spo-text-light); }
.spo-type-customer    { background: var(--spo-primary-light); color: var(--spo-primary); }
.spo-type-subscriber  { background: var(--spo-success-light); color: var(--spo-success); }

.spo-quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.spo-quick-link {
    display: block;
    padding: 12px 16px;
    background: var(--spo-bg-alt);
    border-radius: var(--spo-radius);
    font-size: 14px;
    color: var(--spo-primary);
    text-decoration: none;
    transition: all var(--spo-transition);
}

.spo-quick-link:hover {
    background: var(--spo-primary-light);
}

/* Tables */
.spo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.spo-table thead {
    background: var(--spo-bg-alt);
}

.spo-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--spo-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--spo-border);
}

.spo-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--spo-border);
    vertical-align: middle;
}

.spo-table tr:last-child td {
    border-bottom: none;
}

.spo-orders-table-wrapper,
.spo-downloads-table-wrapper {
    overflow-x: auto;
}

/* Status badges */
.spo-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.spo-status-pending    { background: var(--spo-warning-light); color: var(--spo-warning); }
.spo-status-on-hold    { background: var(--spo-warning-light); color: var(--spo-warning); }
.spo-status-processing { background: var(--spo-info-light); color: var(--spo-info); }
.spo-status-completed  { background: var(--spo-success-light); color: var(--spo-success); }
.spo-status-cancelled  { background: var(--spo-danger-light); color: var(--spo-danger); }
.spo-status-refunded   { background: var(--spo-bg-alt); color: var(--spo-text-muted); }
.spo-status-failed     { background: var(--spo-danger-light); color: var(--spo-danger); }
.spo-status-active     { background: var(--spo-success-light); color: var(--spo-success); }
.spo-status-expired    { background: var(--spo-bg-alt); color: var(--spo-text-muted); }

/* Subscriptions */
.spo-subscriptions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.spo-subscription-card {
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius-lg);
    padding: 20px;
    transition: border-color var(--spo-transition);
}

.spo-subscription-card.spo-sub-active {
    border-left: 3px solid var(--spo-success);
}

.spo-subscription-card.spo-sub-expired {
    border-left: 3px solid var(--spo-text-muted);
    opacity: 0.8;
}

.spo-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.spo-sub-header h4 {
    margin: 0;
    font-size: 16px;
}

.spo-sub-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    font-size: 13px;
}

.spo-sub-detail .spo-label {
    color: var(--spo-text-muted);
    font-weight: 500;
    margin-right: 4px;
}

.spo-sub-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--spo-border);
}

/* Subscriptions Pagination */
.spo-subs-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--spo-border);
}

.spo-subs-pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spo-subs-page-info {
    font-size: 13px;
    color: var(--spo-text-muted);
    min-width: 50px;
    text-align: center;
}

.spo-subs-per-page {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--spo-text-muted);
}

.spo-subs-per-page select {
    padding: 4px 8px;
    border: 1px solid var(--spo-border);
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

/* Downloads */
.spo-download-disabled {
    opacity: 0.6;
}

.spo-download-unavailable {
    font-size: 12px;
    color: var(--spo-text-muted);
    font-style: italic;
}

/* Empty state */
.spo-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--spo-text-light);
}

.spo-empty-state p {
    margin-bottom: 16px;
}

/* Auth */
.spo-auth-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.spo-auth-box {
    padding: 24px;
    background: var(--spo-bg);
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius-lg);
}

.spo-auth-box h2 {
    font-size: 20px;
    margin: 0 0 20px;
}

.spo-auth-box label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--spo-text);
}

.spo-auth-box input[type="text"],
.spo-auth-box input[type="email"],
.spo-auth-box input[type="tel"],
.spo-auth-box input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius);
    background: var(--spo-bg);
    color: var(--spo-text);
    transition: border-color var(--spo-transition), box-shadow var(--spo-transition);
    font-family: var(--spo-font);
}

.spo-auth-box input:focus {
    outline: none;
    border-color: var(--spo-primary);
    box-shadow: 0 0 0 3px var(--spo-primary-light);
}

.spo-forgot-password {
    font-size: 13px;
    color: var(--spo-text-light);
    text-decoration: none;
}

.spo-forgot-password:hover {
    color: var(--spo-primary);
}

/* ==========================================================================
   Content Wrapper (theme compatibility)
   ========================================================================== */

.spo-commerce-page .entry-content,
.spo-commerce-page .page-content,
.spo-commerce-page article .entry-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Ensure full width on SPO pages */
.spo-commerce-page .spo-checkout,
.spo-commerce-page .spo-shop,
.spo-commerce-page .spo-payment {
    font-family: var(--spo-font);

}

.spo-commerce-page .spo-account {
    background: white;
    padding: 5px;
    border: 1px solid silver;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
}

.spo-commerce-page .spo-cart {
    background: white;
    border: 1px solid silver;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
}

/* Section titles */
.spo-checkout h2,
.spo-cart h2,
.spo-account-content h3 {
    font-family: var(--spo-font);
    color: var(--spo-text);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .spo-cols-3,
    .spo-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .spo-product-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .spo-product-gallery {
        position: static;
        grid-template-columns: 1fr;
    }

    .spo-gallery-thumbs {
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        order: 2;
    }

    .spo-gallery-thumb {
        width: 52px;
        height: 52px;
    }

    .spo-gallery-main {
        order: 1;
    }

    .spo-gallery-nav {
        display: none;
    }

    .spo-gallery-dots {
        display: flex;
    }

    .spo-single-product .spo-product-title {
        font-size: 22px;
    }

    .spo-characteristics-table thead th {
        padding: 10px 12px;
        font-size: 13px;
    }

    .spo-characteristics-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .spo-chars-cards {
        grid-template-columns: 1fr 1fr;
    }

    .spo-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .spo-lightbox-prev {
        left: 8px;
    }

    .spo-lightbox-next {
        right: 8px;
    }

    .spo-lightbox-close {
        top: 8px;
        right: 8px;
    }

    .spo-checkout-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .spo-account-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .spo-account-nav {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 4px;
        padding-bottom: 4px;
    }

    .spo-account-nav-item {
        white-space: nowrap;
        padding: 8px 14px;
        font-size: 13px;
    }

    .spo-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .spo-auth-columns {
        grid-template-columns: 1fr;
    }

    .spo-cart-header {
        display: none;
    }

    .spo-cart-item {
        grid-template-columns: 1fr auto auto;
    }

    .spo-form-row-half {
        grid-template-columns: 1fr;
    }

    .spo-order-info-grid {
        grid-template-columns: 1fr;
    }

    .spo-quick-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .spo-cols-2,
    .spo-cols-3,
    .spo-cols-4 {
        grid-template-columns: 1fr;
    }

    .spo-auth-buttons {
        flex-direction: column;
    }

    .spo-checkout-auth-container {
        padding: 16px;
        max-width: 100%;
    }

    .spo-auth-section {
        padding: 16px;
    }

    .spo-shop-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .spo-shop-search-form {
        flex-direction: column;
    }

    .spo-cart-actions {
        flex-direction: column;
    }

    .spo-order-received-actions {
        flex-direction: column;
    }

    .spo-chars-cards {
        grid-template-columns: 1fr;
    }

    .spo-related-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Classic Account Template
   ========================================================================== */

.spo-account-classic {
    max-width: 960px;
    margin: 0 auto;
}

/* Classic Header */
.spo-classic-account-header {
    background: linear-gradient(135deg, #7c3aed, #a855f7, #6d28d9);
    border-radius: var(--spo-radius-lg) var(--spo-radius-lg) 0 0;
    padding: 30px 32px 24px;
    color: #fff;
}

.spo-classic-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.spo-classic-avatar {
    flex-shrink: 0;
}

.spo-classic-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    object-fit: cover;
}

.spo-classic-user-info {
    flex: 1;
}

.spo-classic-user-info h2 {
    color: #fff;
    font-size: 1.4rem;
    margin: 0 0 4px;
    font-weight: 600;
}

.spo-classic-user-email {
    font-size: 0.85rem;
    opacity: 0.85;
}

.spo-classic-logout {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--spo-radius);
    transition: all 0.2s;
    white-space: nowrap;
}

.spo-classic-logout:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

/* Header Stats */
.spo-classic-header-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.spo-classic-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--spo-radius);
    padding: 10px 18px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.spo-classic-stat-icon {
    font-size: 1.5rem;
}

.spo-classic-stat-label {
    display: block;
    font-size: 0.75rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spo-classic-stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
}

.spo-classic-stat-days .spo-classic-stat-value {
    color: #fbbf24;
}

/* Navigation */
.spo-classic-account-nav {
    display: flex;
    background: var(--spo-bg);
    border-left: 1px solid var(--spo-border);
    border-right: 1px solid var(--spo-border);
    overflow-x: auto;
    background: radial-gradient(ellipse at bottom right, #faf1e6, #fdfaf6, #e4efe7);
}

.spo-classic-nav-item {
    flex: 1;
    text-align: center;
    padding: 14px 16px;
    color: var(--spo-text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.spo-classic-nav-item:hover {
    color: var(--spo-text);
    background: var(--spo-bg-hover);
}

.spo-classic-nav-item.spo-active {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
    font-weight: 600;
}

/* Body */
.spo-classic-account-body {
    background: var(--spo-bg);
    border: 1px solid var(--spo-border);
    border-top: none;
    border-radius: 0 0 var(--spo-radius-lg) var(--spo-radius-lg);
    padding: 28px;
}

/* Dashboard Info Grid */
.spo-classic-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.spo-classic-info-card {
    background: var(--spo-bg-alt);
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius);
    padding: 20px;
}

.spo-classic-info-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--spo-text);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--spo-border);
}

.spo-classic-info-table {
    width: 100%;
    border-collapse: collapse;
}

.spo-classic-info-table tr + tr {
    border-top: 1px solid var(--spo-border);
}

.spo-classic-info-table td {
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--spo-text);
}

.spo-classic-info-label {
    color: var(--spo-text-light);
    font-weight: 500;
    width: 45%;
}

.spo-classic-info-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.85rem;
    color: #7c3aed;
    text-decoration: none;
    font-weight: 500;
}

.spo-classic-info-link:hover {
    text-decoration: underline;
}

/* Quick Links */
.spo-classic-quick-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.spo-classic-quick-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: var(--spo-bg-alt);
    border: 1px solid var(--spo-border);
    border-radius: var(--spo-radius);
    color: var(--spo-text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.spo-classic-quick-link:hover {
    background: #f3e8ff;
    border-color: #c4b5fd;
    color: #7c3aed;
}

/* Tab content wrapper */
.spo-classic-tab-content {
    min-height: 200px;
}

/* Account Products Section (shared between compact and classic) */
.spo-account-products-section,
.spo-classic-account-products {
    margin-top: 32px;
    padding: 15px;
    border-top: 1px solid var(--spo-border);
    background: conic-gradient(at left, #f4f5db, #d9dab0, #487e95);
    border-radius: 10px;
    box-shadow: rgba(14, 63, 126, 0.04) 0px 0px 0px 1px, rgba(42, 51, 69, 0.04) 0px 1px 1px -0.5px, rgba(42, 51, 70, 0.04) 0px 3px 3px -1.5px, rgba(42, 51, 70, 0.04) 0px 6px 6px -3px, rgba(14, 63, 126, 0.04) 0px 12px 12px -6px, rgba(14, 63, 126, 0.04) 0px 24px 24px -12px;
}

.spo-account-products-section h3,
.spo-classic-account-products h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--spo-text);
    margin: 0 0 20px;
    text-align: center;
}

.spo-account-products-grid,
.spo-classic-products-grid {
    display: grid;
    grid-template-columns: repeat(var(--spo-cols, 3), 1fr);
    gap: 20px;
}

.spo-account-product-item.spo-product-hidden {
    display: none;
}

.spo-account-products-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.spo-btn-outline {
    background: #ffffff;
    border: 1px solid var(--spo-primary, #7c3aed);
    color: var(--spo-primary, #7c3aed);
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
    box-shadow: rgb(130 62 159) 0px 2px 4px, rgba(0, 0, 0, 0.19) 0px 5px 5px;
}

.spo-btn-outline:hover {
    background: var(--spo-primary, #7c3aed);
    color: #fff;
    text-decoration: none;
}

/* Classic Account Responsive */
@media (max-width: 768px) {
    .spo-classic-account-header {
        padding: 20px;
    }

    .spo-classic-header-content {
        flex-wrap: wrap;
    }

    .spo-classic-avatar img {
        width: 56px;
        height: 56px;
    }

    .spo-classic-user-info h2 {
        font-size: 1.1rem;
    }

    .spo-classic-logout {
        order: -1;
        margin-left: auto;
    }

    .spo-classic-header-stats {
        flex-direction: column;
        gap: 10px;
    }

    .spo-classic-stat {
        width: 100%;
    }

    .spo-classic-info-grid {
        grid-template-columns: 1fr;
    }

    .spo-classic-quick-links {
        grid-template-columns: 1fr 1fr;
    }

    .spo-classic-account-body {
        padding: 16px;
    }

    .spo-classic-nav-item {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .spo-classic-quick-links {
        grid-template-columns: 1fr;
    }

    .spo-classic-header-content {
        flex-direction: column;
        text-align: center;
    }

    .spo-classic-logout {
        order: 0;
        margin-left: 0;
    }

    .spo-account-products-grid,
    .spo-classic-products-grid {
        grid-template-columns: repeat(var(--spo-cols-mob, 1), 1fr);
        gap: 5px;
    }
.spo-account-products-section,
.spo-classic-account-products {
    padding: 0px;
}

}

/* ====================================================================
   Renewal Modal
   ==================================================================== */

.spo-renew-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spo-renew-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 440px;
    width: 90%;
    padding: 0;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.spo-renew-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    line-height: 1;
    z-index: 1;
}

.spo-renew-modal-close:hover {
    color: #333;
}

.spo-renew-modal-header {
    padding: 20px 24px 0;
}

.spo-renew-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--spo-text, #1e293b);
}

.spo-renew-modal-body {
    padding: 16px 24px;
}

.spo-renew-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}

.spo-renew-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.95rem;
}

.spo-renew-info-row:last-child {
    border-bottom: none;
}

.spo-renew-label {
    color: #6b7280;
    font-weight: 500;
}

.spo-renew-price-row {
    font-size: 1.1rem;
}

.spo-renew-price-value {
    font-weight: 700;
    color: var(--spo-primary, #7c3aed);
    font-size: 1.2rem;
}

.spo-renew-note {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
    font-style: italic;
}

.spo-renew-modal-footer {
    padding: 0 24px 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.spo-renew-modal-footer .spo-btn {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
}

@media (max-width: 480px) {
    .spo-renew-modal {
        width: 95%;
    }

    .spo-renew-modal-footer {
        flex-direction: column;
    }
}

/* Nav icons: hidden by default, shown only on small screens */
.spo-account-nav-item .spo-nav-icon,
.spo-classic-nav-item .spo-nav-icon {
    display: none;
}

/* ==========================================================================
   Small Screen Responsive (< 420px)
   ========================================================================== */

@media (max-width: 420px) {

    /* Nav: icon-only mode — labels hidden, icons shown */
    .spo-account-nav-item .spo-nav-label,
    .spo-classic-nav-item .spo-nav-label {
        display: none;
    }

    .spo-account-nav-item .spo-nav-icon,
    .spo-classic-nav-item .spo-nav-icon {
        display: inline-block !important;
        font-size: 18px;
        line-height: 1;
    }

    .spo-account-nav-item {
        padding: 8px 10px;
        text-align: center;
        min-width: 40px;
        justify-content: center;
    }

    .spo-account-nav {
        justify-content: center;
    }

    /* Classic nav: compact */
    .spo-classic-nav-item {
        padding: 10px 8px;
        text-align: center;
        min-width: 40px;
    }

    /* Account header: stack vertically */
    .spo-account-header {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .spo-account-header h2 {
        font-size: 18px;
    }

    /* Classic header: compact */
    .spo-classic-header-content {
        gap: 10px;
    }

    .spo-classic-avatar img {
        width: 48px;
        height: 48px;
    }

    .spo-classic-user-info h2 {
        font-size: 1rem;
    }

    /* Dashboard cards: smaller padding */
    .spo-dashboard-card {
        padding: 14px;
        gap: 10px;
    }

    .spo-card-icon {
        font-size: 24px;
    }

    .spo-card-content h4 {
        font-size: 11px;
    }

    .spo-card-value {
        font-size: 16px;
    }

    /* Subscription cards: compact */
    .spo-subscription-card {
        padding: 14px;
    }

    .spo-sub-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .spo-sub-header h4 {
        font-size: 14px;
    }

    .spo-sub-details {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .spo-sub-detail {
        display: flex;
        justify-content: space-between;
    }

    /* Product cards in account: smaller info */
    .spo-product-info {
        padding: 10px;
    }

    .spo-product-title {
        font-size: 13px;
    }

    .spo-price-current {
        font-size: 15px;
    }

    .spo-price-period {
        font-size: 11px;
    }

    .spo-product-actions {
        flex-direction: column;
    }

    .spo-product-actions .spo-btn {
        width: 90%;
        text-align: center;
        font-size: 0.8rem;
    }

    /* Form fields: compact */
    .spo-edit-account h3 {
        font-size: 18px;
    }

    .spo-edit-account h4 {
        font-size: 15px;
    }

    /* Quick links: single column */
    .spo-quick-links {
        grid-template-columns: 1fr;
    }

    /* Renewal modal */
    .spo-renew-modal-body {
        padding: 12px 16px;
    }

    .spo-renew-modal-header {
        padding: 16px 16px 0;
    }

    .spo-renew-modal-footer {
        padding: 0 16px 16px;
    }

    /* Account products section */
    .spo-account-products-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .spo-account-products-actions .spo-btn {
        text-align: center;
    }
    
    .spo-search-input {
        padding: 8px 5px;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    .spo-product-grid {
        gap: 10px;
    }
}

/* ==========================================================================
   Extra Small Screen Responsive (< 320px)
   ========================================================================== */

@media (max-width: 320px) {
    .spo-account-header h2 {
        font-size: 16px;
    }

    .spo-dashboard-card {
        padding: 10px;
        gap: 8px;
    }

    .spo-card-icon {
        font-size: 20px;
    }

    .spo-card-value {
        font-size: 14px;
    }

    .spo-subscription-card {
        padding: 10px;
    }

    .spo-sub-header h4 {
        font-size: 13px;
    }

    .spo-product-info {
        padding: 8px;
    }

    .spo-product-title {
        font-size: 12px;
    }

    .spo-price-current {
        font-size: 14px;
    }
}

/* ==========================================================================
   Long text overflow — horizontal scroll
   ========================================================================== */

.spo-text-scroll {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    scrollbar-width: thin;
}

.spo-text-scroll::-webkit-scrollbar {
    height: 4px;
}

.spo-text-scroll::-webkit-scrollbar-thumb {
    background: var(--spo-border);
    border-radius: 2px;
}

/* Auto-truncate long text in tables and cards on small screens */
@media (max-width: 480px) {
    .spo-table td,
    .spo-sub-detail span:not(.spo-label),
    .spo-classic-user-email,
    .spo-card-value {
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .spo-classic-user-email {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .spo-classic-user-email::-webkit-scrollbar {
        height: 3px;
    }

    .spo-classic-user-email::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.3);
        border-radius: 2px;
    }

    .spo-subs-pagination {
        flex-direction: column;
        align-items: center;
    }

    .spo-subs-pagination-controls {
        width: 100%;
        justify-content: space-between;
    }
    .spo-shop-category-filter {
    width: 100%;
}

.spo-shop-sort {
    width: 100%;
}

.spo-shop-category-filter select, .spo-shop-sort select {
    width:  100%;
}

.spo-product-card .spo-badge {
    top: 4px;
    padding: 2px 8px;
    font-size: 10px;
    letter-spacing: 0.3px;
    border-radius: 4px;
}
.spo-badge-subscription {
    right: 5px;
}
.spo-commerce-page .entry-content, .spo-commerce-page .page-content, .spo-commerce-page article .entry-content {
    padding: 5px;
}

    .spo-product-actions .spo-btn {
        width: 90%;
        text-align: center;
        font-size: 0.9rem;
    }
}

@media (max-width: 380px) {
.spo-commerce-page .entry-content,
.spo-commerce-page .page-content,
.spo-commerce-page article .entry-content {
    padding: 5px;
}
.spo-classic-account-body {
        padding: 0px;
}

.spo-product-card .spo-badge {
    top: 3px;
    font-size: 7px;
    letter-spacing: 0.7px;
}

.spo-badge-subscription {
    right: 3px;
}

.spo-shop-category-filter {
    width: 100%;
}

.spo-shop-sort {
    width: 100%;
}

.spo-shop-category-filter select, .spo-shop-sort select {
    width:  100%;
}

.spo-classic-info-card {
    padding: 10px;
}

    .spo-product-actions .spo-btn {
        width: 100%;
        text-align: center;
        font-size: 0.75rem;
        padding: 5px 5px;
    }

}

