/* ==========================================================================
   STOREFRONT DESIGN PROFILE, LAYOUT ARCHITECTURE & FLEXBOX STRUCTURE
   ========================================================================== */

.storefront-products-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem;
    background-color: #ffffff;
}

.category-row-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 2rem;
    align-items: stretch; /* Forces matching card structural column heights */
    width: 100%;
    margin-bottom: 2rem;
}

.hardware-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #ffffff; 
    border: 1px solid #e5e7eb; 
    border-radius: 8px;
    overflow: visible; /* CRITICAL: Must be visible so lens panels can extend outward */
    box-sizing: border-box;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hardware-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px -3px rgba(15, 23, 42, 0.12);
}

/* Picture Base Structural Canvas Slot */
.product-picture-slot {
    position: relative;
    width: 100%;
    background: #f8fafc;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    display: block; /* Guarantees layout structural presence */
}

/* Vertical Layout Layer Configuration */
.product-gallery-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto; /* Prevents heights from being squashed */
}

.card-category-badge-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #2563eb; 
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 50; 
    text-transform: uppercase;
}

/* ==========================================================================
   FIXED MULTI-IMAGE SCROLLER THUMBNAIL ENGINE
   ========================================================================== */
.thumbnail-slider-wrapper {
    display: flex !important; /* Overrides any hidden scripting defaults */
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    width: 100%;
    box-sizing: border-box;
    visibility: visible !important; /* Forces layout rendering */
}

.thumb-nav-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

.thumb-nav-btn:hover {
    color: #2563eb;
}

.thumbnail-scroller-slot {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none; /* Hide scrollbars for Firefox layout cleanliness */
    flex-grow: 1;
    justify-content: center;
    align-items: center;
}

.thumbnail-scroller-slot::-webkit-scrollbar {
    display: none; /* Hide scrollbars for WebKit layout cleanliness */
}

.thumb-track-item {
    width: 42px !important;  /* Strict layout dimension control */
    height: 42px !important; /* Strict layout dimension control */
    object-fit: cover;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    border-radius: 4px;
    flex-shrink: 0; /* Prevents items from squishing to 0px width */
    display: block !important;
    transition: border-color 0.15s ease;
}

.thumb-track-item:hover,
.thumb-track-item.active {
    border-color: #2563eb;
}

/* ==========================================================================
   METADATA TYPOGRAPHY AND CONTENT GRID ALIGNMENT
   ========================================================================== */
.hardware-card-body {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    flex-grow: 1; 
}

.hardware-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.hardware-brand-label {
    color: #374151; 
    font-weight: 500;
}

.hardware-condition-label {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.hardware-title-heading {
    font-size: 1.15rem;
    font-weight: 600;
    color: #000000; 
    line-height: 1.4;
    margin: 0 0 0.75rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em; 
}

.hardware-specs-snippet-box {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 4.5em;
}

.hardware-card-pricing-footer {
    margin-top: auto; 
    padding-top: 1rem;
    border-top: 1px dashed #e5e7eb;
}

.stock-delivery-matrix {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.numerical-cost-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #dc2626; 
}

.cart-action-trigger-zone {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.25rem 1.25rem 1.25rem;
    background: #ffffff;
}

.cart-qty-spinner {
    width: 65px;
    padding: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    text-align: center;
}

.add-to-cart-action-btn {
    flex-grow: 1;
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.add-to-cart-action-btn:hover {
    background: #1d4ed8;
}

.category-section-divider {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.category-section-line {
    border: 0;
    height: 1px;
    background: #e2e8f0;
    margin-top: 0.5rem;
}
/* ==========================================================================
   EURASIA HIGH-PRECISION MAIN ENGINE HOVER LENS OPTICS & LIGHTBOX ZOOM MATRIX
   ========================================================================== */

/* Main Zoom Interface Engine Box bounding area wrapper */
.main-stage-view.image-zoom-container.eurasia-lens-frame {
    position: relative;
    overflow: hidden; /* Restricts magnification lens boundary layout cleanly */
    width: 100%;
    height: 220px; /* Locked standard viewport staging layout dimension height */
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-product-img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    background: #f8fafc;
}

/* Moving Magnifying Lens Indicator */
.zoom-lens {
    position: absolute;
    border: 1px solid #2563eb;
    background-color: rgba(37, 99, 235, 0.12);
    width: 90px;
    height: 90px;
    border-radius: 4px;
    visibility: hidden;
    z-index: 40;
    pointer-events: none;
}

/* Floating Magnification Preview Panel Window Window */
.zoom-result-window.panel-glow-card {
    position: absolute;
    left: 104%; 
    top: 0;
    width: 340px;
    height: 340px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    background-repeat: no-repeat;
    visibility: hidden;
    border-radius: 8px;
    z-index: 1050;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

/* Hover Configuration Matrix Triggers */
.main-stage-view.image-zoom-container.eurasia-lens-frame:hover .zoom-lens {
    visibility: visible;
}
.main-stage-view.image-zoom-container.eurasia-lens-frame:hover + .zoom-result-window.panel-glow-card {
    visibility: visible;
}

/* ==========================================================================
   TRANS-MODAL LIGHTBOX GLASS BACKDROP CANVAS OVERLAY SCREEN
   ========================================================================== */
.lightbox-overlay-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2500;
    display: none;
    align-items: center;
    justify-content: center;
    user-select: none;
    animation: lightboxFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxFadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox-image-stage {
    max-width: 80%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    overflow: hidden;
}

.lightbox-image-stage img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    transform: scale(0.95);
    animation: imagePopScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes imagePopScale { to { transform: scale(1); } }

/* Lightbox Mechanical Control Button Components */
.lightbox-action-btn {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 1.5rem;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    z-index: 2510;
}

.lightbox-action-btn:hover {
    background-color: #ffffff;
    color: #0f172a;
    border-color: #ffffff;
    transform: scale(1.05);
}

.lightbox-action-btn:active { transform: scale(0.98); }
.exit-close-btn { top: 24px; right: 24px; font-size: 1.25rem; }
.arrow-nav-btn.lane-left-btn { left: 40px; }
.arrow-nav-btn.lane-right-btn { right: 40px; }

/* Responsive Engines */
@media (max-width: 992px) {
    .zoom-result-window.panel-glow-card, 
    .zoom-lens { 
        display: none !important; 
    } 
    .lightbox-image-stage { 
        max-width: 90%; 
    }
    .lightbox-action-btn { 
        width: 44px; 
        height: 44px; 
        font-size: 1.2rem; 
    }
    .arrow-nav-btn.lane-left-btn { left: 16px; }
    .arrow-nav-btn.lane-right-btn { right: 16px; }
}
/* ==========================================================================
   CATEGORY SELECTION FILTER TOOLBAR UI DECLARATIONS
   ========================================================================== */
.storefront-filter-toolbar {
    width: 100%;
    max-width: 1200px;
    margin: 1.5rem auto 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-sizing: border-box;
}

.filter-toolbar-label {
    font-size: 1rem;
    font-weight: 600;
    color: #374151; /* Slate Dark Grey to match typography */
}

.filter-select-dropdown {
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #0f172a;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-select-dropdown:focus {
    border-color: #2563eb; /* Corporate Blue Highlight Accent */
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
