/* ==========================================================================
   Storefront Stylesheet (FTSol.HNT Public Customer Views)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Global Base & Layout Reset
   -------------------------------------------------------------------------- */
html, body {
    height: 100%;
    overflow-x: clip; /* Fixes position: sticky bugs caused by overflow:hidden */
}

body {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-light-base, #f8fafc);
    color: var(--text-light-main, #0f172a);
    font-family: var(--font-sans);
}

main {
    flex: 1 0 auto;
}

.transition-all {
    transition: all 0.3s ease;
}

.letter-spacing-1 {
    letter-spacing: 0.5px;
}

.text-dark {
    color: var(--text-light-main, #0f172a) !important;
}

.hover-opacity-100:hover {
    opacity: 1 !important;
    transform: translateY(-2px);
}

.text-hover-white:hover {
    color: #ffffff !important;
    opacity: 1 !important;
    transform: translateX(4px);
}

.hover-primary:hover {
    color: var(--brand-primary, #8B5CF6) !important;
    border-color: var(--brand-primary, #8B5CF6) !important;
}

/* --------------------------------------------------------------------------
   2. Top Marquee Ticker
   -------------------------------------------------------------------------- */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
    padding-right: 2rem;
}

.ticker {
    display: inline-block;
    white-space: nowrap;
    padding-right: 100%;
    box-sizing: content-box;
    animation: ticker 25s linear infinite;
}

.ticker:hover {
    animation-play-state: paused;
}

@keyframes ticker {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

.ticker-close {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    z-index: 10;
    padding: 0 0.5rem;
}

.ticker-close:hover {
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   3. Category Filter Pills & Navigation
   -------------------------------------------------------------------------- */
.category-pills-container {
    padding: 0.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
}

.category-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.category-scroll-bar {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 2px;
    scroll-behavior: smooth;
    flex-grow: 1;
}

.category-scroll-bar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.category-nav-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--border-light, #e2e8f0);
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.category-nav-btn:hover:not(:disabled) {
    background: var(--brand-primary, #8b5cf6);
    color: #ffffff;
    border-color: var(--brand-primary, #8b5cf6);
    box-shadow: 0 3px 10px rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}

.category-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    box-shadow: none;
    background: #f8fafc;
    border-color: var(--border-light, #e2e8f0);
    color: #94a3b8;
}

.category-pill {
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill, 30px);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.25s ease;
    border: 1px solid var(--border-light, #e2e8f0);
    background: #ffffff;
    color: #475569;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    flex-shrink: 0;
}

.category-pill:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.category-pill.active {
    background: var(--gradient-brand, linear-gradient(135deg, #8B5CF6 0%, #3B82F6 100%));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.3);
}

.category-pill .badge {
    font-size: 0.75rem;
    font-weight: 700;
}

/* Category Section Header */
.category-section {
    scroll-margin-top: 80px;
}

.category-header {
    background: #ffffff;
    border-radius: var(--radius-lg, 16px);
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-light, #e2e8f0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.category-icon-box {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md, 12px);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
    color: var(--brand-primary, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   4. Product Cards & Actions
   -------------------------------------------------------------------------- */
.product-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-xl, 20px);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
}

.product-img-wrapper {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: #f1f5f9;
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    padding: 1rem;
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

.product-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-primary, #8b5cf6);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.product-title {
    color: #0f172a;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.product-title:hover {
    color: var(--brand-primary, #8b5cf6);
}

.product-price {
    color: #1e293b;
    font-weight: 800;
    font-size: 1.35rem;
}

/* Quantity Stepper */
.qty-btn {
    background: #f1f5f9;
    border: 1px solid var(--border-light, #e2e8f0);
    color: #475569;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm, 8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-btn:hover:not(:disabled) {
    background: #e2e8f0;
    color: #0f172a;
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8fafc;
}

.quantity-input {
    border: 1px solid var(--border-light, #e2e8f0);
    text-align: center;
    background: #ffffff;
    font-weight: 600;
    color: #0f172a;
    width: 45px !important;
    height: 32px;
    border-radius: var(--radius-sm, 8px);
    padding: 0;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.quantity-input[type=number] {
    -moz-appearance: textfield;
}

.quantity-input:focus {
    border-color: var(--brand-primary, #8b5cf6);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    outline: none;
}

.btn-add-to-cart {
    background: linear-gradient(90deg, #8B5CF6 0%, #3B82F6 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm, 8px);
    height: 32px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
    padding: 0 1rem;
    flex-grow: 1;
}

.btn-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
    color: white;
}

/* Virtual Loader Box */
.virtual-loader-box {
    background: #ffffff;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: var(--radius-lg, 16px);
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

/* --------------------------------------------------------------------------
   5. Account & Auth Pages (Login / Register)
   -------------------------------------------------------------------------- */
.form-control:focus {
    border-color: rgba(139, 92, 246, 0.5);
    background: #fff !important;
}

.input-group:focus-within .input-group-text,
.input-group:focus-within .form-control {
    border-color: rgba(139, 92, 246, 0.5);
    background: #fff !important;
}

.input-group:focus-within .input-group-text {
    color: var(--brand-primary, #8b5cf6) !important;
}

/* --------------------------------------------------------------------------
   6. Track Order & Soft Panels
   -------------------------------------------------------------------------- */
.glass-panel {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.glass-panel .form-control:focus {
    border-color: rgba(139, 92, 246, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
}
