/* ================================================
   SpeedPaper Component Classes
   Unified CSS classes to reduce duplication
   ================================================ */

/* ================================================
   FORCE LIGHT MODE - Disable system dark mode
   ================================================ */
:root {
    color-scheme: light only;
}

/* Override any system dark mode preferences */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #f8fafc;
        --bg-secondary: #f1f5f9;
        --card-bg: #ffffff;
        --text-main: #0f172a;
        --text-secondary: #334155;
        --text-muted: #64748b;
        --border-color: #e2e8f0;
    }
    
    body {
        background-color: var(--bg-color) !important;
        color: var(--text-main) !important;
    }
    
    /* Force white backgrounds on cards */
    .sp-card,
    .bg-white,
    [class*="bg-white"] {
        background-color: #ffffff !important;
        color: #1f2937 !important;
    }
    
    /* Force dark text */
    .text-gray-800,
    .text-gray-700,
    .text-gray-600,
    .text-gray-900 {
        color: inherit !important;
    }
    
    /* Inputs should stay light */
    input, select, textarea {
        background-color: #ffffff !important;
        color: #1f2937 !important;
        border-color: #d1d5db !important;
    }
    
    input::placeholder,
    textarea::placeholder {
        color: #9ca3af !important;
    }
}

/* ================================================
   CARDS & PANELS
   ================================================ */

/* Base Card - replaces: bg-white rounded-xl shadow-sm border border-gray-100 */
.sp-card {
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.06);
}

/* Card with padding - replaces: bg-white rounded-xl shadow-sm border border-gray-100 p-4/p-5/p-6 */
.sp-card-padded {
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.06);
    padding: 1.25rem;
}

@media (min-width: 768px) {
    .sp-card-padded {
        padding: 1.5rem;
    }
}

/* Large rounded card - replaces: bg-white rounded-2xl shadow-sm border border-gray-100 */
.sp-card-lg {
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.06);
}

/* Surface panel (dark theme) - replaces surface-panel classes */
.sp-panel {
    background: radial-gradient(circle at 20% 20%, rgba(62, 224, 255, 0.06), transparent 40%),
                radial-gradient(circle at 80% 0%, rgba(255, 159, 107, 0.05), transparent 45%),
                rgba(12, 17, 36, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
}

/* 3D Panel effect - replaces bg-3ds-panel */
.sp-panel-3d {
    background: linear-gradient(135deg, #0c1f4a, #0a1330);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 
                inset 0 1px 0 rgba(255, 255, 255, 0.08), 
                0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.sp-panel-3d::after {
    content: "";
    position: absolute;
    inset: -120% 30%;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.08) 35%, transparent 70%);
    transform: rotate(-12deg);
    animation: shine 8s ease-in-out infinite;
    pointer-events: none;
}

/* ================================================
   BUTTONS
   ================================================ */

/* Primary button - replaces: bg-blue-600 text-white font-bold py-X px-X rounded-xl hover:bg-blue-700 */
.sp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    border-radius: 0.75rem;
    transition: all 0.2s cubic-bezier(0.33, 1, 0.68, 1);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.sp-btn-primary {
    background: #2563eb;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
}

.sp-btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.sp-btn-primary:active {
    transform: translateY(0);
}

/* Secondary/White button */
.sp-btn-white {
    background: #ffffff;
    color: #2563eb;
    padding: 0.625rem 1.5rem;
}

.sp-btn-white:hover {
    background: #fcd34d;
    color: #1e3a5f;
}

/* Accent/Yellow button */
.sp-btn-accent {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
}

.sp-btn-accent:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
}

/* WhatsApp button */
.sp-btn-whatsapp {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.25);
}

.sp-btn-whatsapp:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-2px);
}

/* Circle icon button - replaces: w-9 h-9 rounded-full bg-X flex items-center justify-center */
.sp-btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.sp-btn-icon-sm {
    width: 2rem;
    height: 2rem;
}

.sp-btn-icon-lg {
    width: 2.5rem;
    height: 2.5rem;
}

/* ================================================
   FORM INPUTS
   ================================================ */

/* Standard input - replaces: w-full p-3 bg-gray-50 border border-gray-200 rounded-xl text-sm focus:border-blue-500 */
.sp-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: #1f2937;
    transition: all 0.2s ease;
}

.sp-input:hover {
    border-color: #9ca3af;
}

.sp-input:focus {
    outline: none;
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sp-input::placeholder {
    color: #9ca3af;
}

/* Input label */
.sp-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* ================================================
   BADGES & TAGS
   ================================================ */

/* Base badge - replaces: text-xs font-bold px-X py-X rounded-full */
.sp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
}

.sp-badge-yellow {
    background: #fcd34d;
    color: #1e3a5f;
}

.sp-badge-blue {
    background: #2563eb;
    color: #ffffff;
}

.sp-badge-green {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.sp-badge-red {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.sp-badge-white {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* ================================================
   PRODUCT CARD
   ================================================ */

/* Product card container */
.sp-product-card {
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #f1f5f9;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sp-product-card:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

/* Product image container */
.sp-product-image {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(to bottom right, #f9fafb, #f3f4f6);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.sp-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.3s ease;
}

.sp-product-card:hover .sp-product-image img {
    transform: scale(1.1);
}

/* Product category label */
.sp-product-category {
    font-size: 0.625rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #9ca3af;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

/* Product name */
.sp-product-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.sp-product-card:hover .sp-product-name {
    color: #2563eb;
}

/* Product price */
.sp-product-price {
    font-size: 1rem;
    font-weight: 800;
    color: #1e3a5f;
}

@media (min-width: 768px) {
    .sp-product-price {
        font-size: 1.125rem;
    }
}

/* ================================================
   INFO CARDS (Location, Contact, etc.)
   ================================================ */

.sp-info-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.25s ease;
}

.sp-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.sp-info-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sp-info-icon-blue {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.sp-info-icon-green {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.sp-info-icon-yellow {
    background: rgba(245, 158, 11, 0.2);
    color: #1e3a5f;
}

/* ================================================
   CATEGORY CIRCLES
   ================================================ */

.sp-category-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 70px;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sp-category-circle:hover {
    transform: scale(1.05);
}

.sp-category-circle-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.25s ease;
}

@media (min-width: 768px) {
    .sp-category-circle-icon {
        width: 5rem;
        height: 5rem;
    }
}

.sp-category-circle:hover .sp-category-circle-icon {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sp-category-circle-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.sp-category-circle:hover .sp-category-circle-label {
    color: #fcd34d;
}

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

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

.sp-breadcrumb a {
    color: #6b7280;
    transition: color 0.2s ease;
}

.sp-breadcrumb a:hover {
    color: #2563eb;
}

.sp-breadcrumb-current {
    color: #1f2937;
    font-weight: 500;
}

.sp-breadcrumb-separator {
    font-size: 0.625rem;
    opacity: 0.5;
}

/* ================================================
   SECTION HEADERS
   ================================================ */

.sp-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sp-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
}

.sp-section-link {
    font-size: 0.875rem;
    color: #fcd34d;
    transition: text-decoration 0.2s ease;
}

.sp-section-link:hover {
    text-decoration: underline;
}

/* ================================================
   PROMO BANNER / CTA
   ================================================ */

.sp-cta-banner {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 1rem;
    padding: 1.5rem;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .sp-cta-banner {
        padding: 2rem;
    }
}

.sp-cta-banner::before,
.sp-cta-banner::after {
    content: '';
    position: absolute;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
}

.sp-cta-banner::before {
    width: 16rem;
    height: 16rem;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
}

.sp-cta-banner::after {
    width: 8rem;
    height: 8rem;
    bottom: 0;
    left: 0;
    transform: translate(-50%, 50%);
}

.sp-cta-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .sp-cta-content {
        flex-direction: row;
        text-align: left;
    }
}

.sp-cta-icon {
    width: 4rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.75rem;
}

@media (min-width: 768px) {
    .sp-cta-icon {
        width: 5rem;
        height: 5rem;
        font-size: 2rem;
    }
}

/* ================================================
   CART ITEM
   ================================================ */

.sp-cart-item {
    background: #ffffff;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .sp-cart-item {
        padding: 1.25rem;
    }
}

.sp-cart-item-image {
    width: 5rem;
    height: 5rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

@media (min-width: 768px) {
    .sp-cart-item-image {
        width: 6rem;
        height: 6rem;
    }
}

.sp-cart-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.sp-cart-item:hover .sp-cart-item-image img {
    transform: scale(1.1);
}

/* ================================================
   QUANTITY CONTROLS
   ================================================ */

.sp-quantity-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sp-quantity-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: #f3f4f6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .sp-quantity-btn {
        width: 2.25rem;
        height: 2.25rem;
    }
}

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

.sp-quantity-input {
    width: 3rem;
    text-align: center;
    font-weight: 700;
    border: none;
    background: transparent;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .sp-quantity-input {
        width: 3.5rem;
        padding: 0.5rem;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
    }
}

/* ================================================
   EMPTY STATE
   ================================================ */

.sp-empty-state {
    text-align: center;
    padding: 2rem;
}

@media (min-width: 768px) {
    .sp-empty-state {
        padding: 3rem;
    }
}

.sp-empty-icon {
    width: 6rem;
    height: 6rem;
    background: linear-gradient(to bottom right, #f3f4f6, #f9fafb);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #d1d5db;
    font-size: 2rem;
}

.sp-empty-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.sp-empty-text {
    color: #6b7280;
    margin-bottom: 2rem;
    max-width: 24rem;
    margin-left: auto;
    margin-right: auto;
}

/* ================================================
   TRUST BADGES
   ================================================ */

.sp-trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    text-align: center;
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
}

.sp-trust-badge {
    color: #9ca3af;
}

.sp-trust-badge i {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    display: block;
}

.sp-trust-badge span {
    font-size: 0.625rem;
    font-weight: 500;
}

/* ================================================
   UTILITY CLASSES
   ================================================ */

/* Hide scrollbar */
.sp-hide-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.sp-hide-scroll::-webkit-scrollbar {
    display: none;
}

/* Line clamp */
.sp-line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sp-line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Glow border effect */
.sp-glow-border {
    position: relative;
}

.sp-glow-border::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 1rem;
    padding: 1px;
    background: linear-gradient(120deg, rgba(62, 224, 255, 0.45), rgba(255, 159, 107, 0.45), rgba(134, 92, 255, 0.45));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

/* Floating animation class */
.sp-float {
    animation: float 3s ease-in-out infinite;
}

/* Pulse animation class */
.sp-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ================================================
   RESPONSIVE HELPERS
   ================================================ */

.sp-container {
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .sp-container {
        padding: 0 1.5rem;
    }
}

/* Mobile-only visibility */
.sp-mobile-only {
    display: block;
}

@media (min-width: 768px) {
    .sp-mobile-only {
        display: none;
    }
}

/* Desktop-only visibility */
.sp-desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .sp-desktop-only {
        display: block;
    }
}

/* ================================================
   KEYFRAMES (shared)
   ================================================ */

@keyframes shine {
    0% { transform: translateX(-120%) rotate(-12deg); }
    60% { transform: translateX(120%) rotate(-12deg); }
    100% { transform: translateX(120%) rotate(-12deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.02); }
}
