/* ===================================================================== */
/* === RETAIL ADMIN COMPONENTS === */
/* Navigation, Carousels, Containers, and UI Components */
/* ===================================================================== */

/* === DATE FILTER COMPONENT === */

.retail-date-filter {
    margin: 20px auto;
    max-width: clamp(600px, 90%, 960px);
    background: var(--gradient-glass);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    padding: 24px;
    border-radius: var(--radius-xl);
    border: var(--border-glass);
    box-shadow: var(--shadow-glass);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

.retail-date-filter::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: rotate 8s linear infinite;
    pointer-events: none;
}

/* === CONTAINER STYLES === */

/* Standard Container Styles */
.retail-product-table-container,
.retail-filter-wrapper,
.retail-admin-wrapper .retail-children-table-wrapper {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    border-radius: var(--radius-xl);
    border: var(--border-glass);
    box-shadow: var(--shadow-glass);
    margin: 24px auto;
    max-width: clamp(600px, 90%, 1000px);
    animation: slideInUp 0.8s ease-out;
    position: relative;
}

/* Container Accent Bars - All Use Primary Color */
.retail-product-table-container::before,
.retail-filter-wrapper::before,
.retail-admin-wrapper .retail-children-table-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* === FILTER WRAPPER === */

.retail-filter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 24px auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: var(--border-glass);
    box-shadow: var(--shadow-glass);
    max-width: clamp(600px, 90%, 1000px);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

.retail-filter-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.retail-admin-wrapper .retail-filter-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

/* === CONSISTENT VIEW LAYOUT === */

/* Apply consistent width constraints to all main view sections */
#view-compra,
#view-productos,
#view-pedidos {
    max-width: clamp(600px, 90%, 1200px);
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Ensure child containers work within the constrained parent width */
#view-compra .retail-filter-wrapper,
#view-compra .retail-children-table-wrapper,
#view-productos .retail-category-filter-section,
#view-productos .retail-product-table-container,
#view-pedidos .retail-orders-filter-wrapper,
#view-pedidos .retail-orders-controls-wrapper,
#view-pedidos .retail-orders-table-wrapper {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Special handling for orders table to maintain full width within container */
#view-pedidos .retail-orders-table {
    width: 100%;
    max-width: 100%;
}

/* === PRODUCTOS VIEW CONSISTENT LAYOUT === */

/* Ensure the Productos view has consistent width constraints like other views */
#view-productos {
    max-width: clamp(600px, 90%, 1200px);
    margin: 0 auto;
    padding: 0 20px;
}

/* Adjust child elements to work within the constrained parent */
#view-productos .retail-category-filter-section,
#view-productos .retail-product-table-container {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Create Product Button - ensure it stays centered within the constrained layout */
#view-productos .retail-create-product-btn {
    max-width: clamp(300px, 50%, 500px);
    margin: 0 auto 24px;
}

/* === PEDIDOS VIEW GLASSMORPHISM WRAPPERS === */

/* Date Range Filter Wrapper - matches retail-category-filter-section styling */
.retail-orders-filter-wrapper {
    margin: 0 auto 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: var(--border-glass);
    box-shadow: var(--shadow-glass);
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

.retail-orders-filter-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.retail-orders-filter-wrapper label {
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Controls Wrapper - matches retail-filter-wrapper styling */
.retail-orders-controls-wrapper {
    margin: 0 auto 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: var(--border-glass);
    box-shadow: var(--shadow-glass);
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.7s ease-out;
}

.retail-orders-controls-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* === ORDERS SEARCH AND PAGINATION === */

/* Search Wrapper */
.retail-orders-search-wrapper {
    margin: 0 auto 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    border: var(--border-glass);
    box-shadow: var(--shadow-glass);
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

.retail-orders-search-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Search Input Container */
.search-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 300px;
}

/* Pagination Size Selector */
.pagination-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: var(--font-weight-normal);
    color: #4a5568;
}

/* Pagination Controls */
.retail-pagination {
    margin: 24px auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    border: var(--border-glass);
    box-shadow: var(--shadow-glass);
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.retail-pagination::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.pagination-info {
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    color: #4a5568;
    text-align: center;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-ellipsis {
    padding: 10px 8px;
    color: #9ca3af;
    font-weight: var(--font-weight-bold);
}

/* === NAVIGATION === */

/* Premium Navigation with Glassmorphism */
.retail-topnav {
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    margin: 0 auto 24px;
    width: 100%;
    max-width: 660px;
    padding: 8px 12px;
    gap: 8px;
    position: sticky;
    top: 40px;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-glass);
    border: var(--border-glass);
    animation: slideInUp 0.6s ease-out;
}

.retail-topnav .nav-btn {
    flex: 1 1 0;
    text-align: center;
    background: transparent;
    border: none;
    font-size: 15px;
    padding: 12px 8px;
    border-radius: var(--radius-md);
    color: #4a5568;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.retail-topnav .nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.retail-topnav .nav-btn:hover::before {
    left: 100%;
}

.retail-topnav .nav-btn:hover {
    background: rgba(236, 138, 65, 0.1);
    color: var(--brand-primary);
    transform: translateY(-1px);
}

.retail-topnav .nav-btn.active {
    background: var(--gradient-primary);
    color: white;
    font-weight: var(--font-weight-bold);
    box-shadow: var(--shadow-brand);
    transform: translateY(-2px) scale(1.02);
}

.retail-topnav .nav-btn.active::before {
    display: none;
}

/* === CATEGORY FILTER SECTION === */

.retail-category-filter-section {
    margin: 0 auto 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: var(--border-glass);
    box-shadow: var(--shadow-glass);
    max-width: clamp(600px, 90%, 1000px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.7s ease-out;
}

.retail-category-filter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.retail-category-filter-section label {
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.retail-category-filter-section select {
    width: 100%;
    padding: 16px 18px;
    font-size: 15px;
    line-height: 1.5;
    border: none;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #4a5568;
    font-weight: var(--font-weight-normal);
    vertical-align: middle;
    box-sizing: border-box;
    height: auto;
    min-height: 48px;
}

.retail-category-filter-section select:focus {
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25), inset 0 2px 10px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

/* === CATEGORY TAB BAR === */

.category-tab-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    border: var(--border-glass);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    animation: tabBarSlide 0.8s ease-out;
    width: 100%;
    box-sizing: border-box;
}

.category-tab-bar::-webkit-scrollbar {
    height: 4px;
}

.category-tab-bar::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 2px;
}

.category-tab-bar::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 2px;
}

.category-tab-bar::-webkit-scrollbar-thumb:hover {
    background: rgba(236, 138, 65, 0.5);
}

.category-tab {
    padding: 10px 16px;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    color: #4a5568;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
    width: fit-content;
    min-width: fit-content;
    max-width: max-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.category-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.category-tab:hover::before {
    left: 100%;
}

.category-tab:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.category-tab.active {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-3px) scale(1.08);
    box-shadow: var(--shadow-brand);
}

.category-tab.active::before {
    display: none;
}

/* === SEDE TAB BAR === */

.sede-tab-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    border: var(--border-glass);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    animation: tabBarSlide 0.8s ease-out;
    width: 100%;
    box-sizing: border-box;
}

.sede-tab-bar::-webkit-scrollbar {
    height: 4px;
}

.sede-tab-bar::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 2px;
}

.sede-tab-bar::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 2px;
}

.sede-tab-bar::-webkit-scrollbar-thumb:hover {
    background: rgba(236, 138, 65, 0.5);
}

.sede-tab {
    padding: 10px 16px;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    color: #4a5568;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    -webkit-border-radius: var(--radius-md);
    -moz-border-radius: var(--radius-md);
}

.sede-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.sede-tab:hover::before {
    left: 100%;
}

.sede-tab:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.sede-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

.sede-tab.active::before {
    display: none;
}

/* Enhanced Category Tabs for Sedes */
.sede-tab-bar+.category-tab-bar {
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.7);
}

.sede-tab-bar+.category-tab-bar .category-tab {
    background: rgba(255, 255, 255, 0.5);
}

.sede-tab-bar+.category-tab-bar .category-tab.active {
    background: var(--gradient-primary);
}

/* === PRODUCT CATEGORY CAROUSEL === */

.product-category-rows {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-category-carousel {
    margin: 0;
}

.product-category-carousel .carousel-track {
    padding: 10px 15px !important;
    scroll-snap-type: none;
    min-height: auto;
}

.product-category-carousel .carousel-card {
    min-width: 140px;
    height: 50px;
    /* Reduced height for compact design */
    scroll-snap-align: start;
    margin-right: 8px;
}

.product-category-carousel .carousel-card .card-content {
    padding: 8px 12px;
}

.product-category-carousel .carousel-card .card-label {
    font-size: 0.85rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    text-align: center;
}

/* Row labels for sede-based layouts */
.carousel-row-label {
    font-size: 0.85rem;
    font-weight: var(--font-weight-bold);
    color: var(--brand-primary);
    margin-bottom: 4px;
    margin-left: 15px;
    opacity: 0.8;
}

/* === CAROUSEL COMPONENT === */

.carousel-container {
    position: relative;
    width: 100%;
    margin: 20px 0;
    background: var(--gradient-glass);
    border: var(--border-glass);
    border-radius: var(--radius-xl);
    backdrop-filter: var(--backdrop-blur);
    padding: 20px;
    box-shadow: var(--shadow-glass);
    overflow: hidden;
}

.carousel-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0.05;
    border-radius: var(--radius-xl);
    pointer-events: none;
}

.carousel-track {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 15px 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(236, 138, 65, 0.3) transparent;
    position: relative;
}

.carousel-track::-webkit-scrollbar {
    height: 6px;
}

.carousel-track::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.carousel-track::-webkit-scrollbar-thumb {
    background: rgba(236, 138, 65, 0.3);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.carousel-track::-webkit-scrollbar-thumb:hover {
    background: rgba(236, 138, 65, 0.5);
}

.carousel-container::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8));
    pointer-events: none;
    border-radius: var(--radius-full);
    opacity: 0.6;
    z-index: 1;
}

.carousel-card {
    flex: 0 0 auto;
    min-width: 160px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out;
    user-select: none;
}

.carousel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 13px;
}

.carousel-card:hover::before {
    opacity: 0.1;
}

.carousel-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-brand);
    border-color: var(--brand-primary);
}

.carousel-card.active {
    background: rgba(236, 138, 65, 0.15);
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-brand);
    transform: translateY(-3px);
}

.carousel-card.active::before {
    opacity: 0.15;
}

.card-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px;
    text-align: center;
}

.card-label {
    font-size: 13px;
    font-weight: var(--font-weight-bold);
    color: #333;
    line-height: 1.3;
    transition: color 0.3s ease;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.carousel-card:hover .card-label {
    color: var(--brand-primary-dark);
}

.carousel-card.active .card-label {
    color: var(--brand-primary-dark);
    font-weight: var(--font-weight-bold);
}

/* Specific Carousel Styles */
.sede-carousel .carousel-card {
    min-width: 180px;
}

.category-carousel .carousel-card {
    min-width: 160px;
}

.sede-carousel {
    margin-bottom: 20px !important;
}

/* Specific padding override for category-tabs carousel */
.category-carousel .carousel-track,
#category-tabs.carousel-track.category-tab-bar {
    padding: 15px 20px !important;
    scroll-snap-type: none !important;
}

/* Disable scroll snap for category carousel cards */
.category-carousel .carousel-card,
#category-tabs .carousel-card {
    scroll-snap-align: none !important;
}

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

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 2px;
    justify-content: center;
    padding: 6px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    border: 2px solid rgba(236, 138, 65, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 140px;
    width: fit-content;
    margin: 0 auto;
}

.quantity-selector::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(236, 138, 65, 0.05) 0%, rgba(212, 119, 58, 0.08) 100%);
    border-radius: 16px;
    pointer-events: none;
}

.quantity-selector:hover {
    border-color: rgba(236, 138, 65, 0.3);
    box-shadow: 0 12px 35px rgba(236, 138, 65, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* === ADDON STYLES === */

.addon-group {
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    margin-top: 16px;
    border: var(--border-glass);
    box-shadow: var(--shadow-glass);
    position: relative;
    animation: fadeInUp 0.6s ease-out;
    overflow: hidden;
}

.addon-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-secondary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.addon-group-title {
    font-weight: var(--font-weight-bold);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.addon-options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    align-items: stretch;
}

.addon-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--border-glass);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
    margin: 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    user-select: none;
    overflow: hidden;
}

.addon-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.addon-option:hover::before {
    left: 100%;
}

.addon-option:hover {
    background: rgba(236, 138, 65, 0.1);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(236, 138, 65, 0.3);
}

.addon-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.addon-option span {
    position: relative;
    z-index: 1;
    transition: all 0.25s ease;
    pointer-events: none;
}

.addon-option:has(input:checked) {
    background: var(--gradient-primary);
    border-color: var(--brand-primary);
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-brand);
}

.addon-option:has(input:checked) span {
    font-weight: var(--font-weight-bold);
}

.addon-option:has(input:checked)::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 8px;
    color: var(--brand-primary);
    font-weight: bold;
    font-size: 12px;
    background: white;
    border-radius: var(--radius-full);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

.addon-option:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

.addon-option:focus-within {
    outline: 2px solid #2196f3;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.addon-option input:focus {
    outline: none;
}

/* === SPINNER === */

/* === UNIFIED SPINNER SYSTEM === */
.retail-spinner,
#retail-loader .retail-spinner,
.retail-loader-bg .retail-spinner,
.retail-admin-wrapper .retail-spinner {
    width: 60px !important;
    height: 60px !important;
    border: 4px solid rgba(236, 138, 65, 0.2) !important;
    border-top: 4px solid var(--brand-primary) !important;
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
    animation-play-state: running !important;
    animation-fill-mode: none !important;
    animation-delay: 0s !important;
    animation-direction: normal !important;
    box-shadow: 0 8px 25px rgba(236, 138, 65, 0.3) !important;
    position: relative !important;
    flex-shrink: 0 !important;
    transform-origin: center center !important;
    will-change: transform !important;
    display: block !important;
    margin: 0 auto !important;
    z-index: 1 !important;
}

/* === MESSAGES === */

.retail-admin-wrapper .retail-success,
.retail-admin-wrapper .retail-error {
    margin: 16px 0;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-bold);
    border: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.retail-admin-wrapper .retail-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--brand-success);
    border-left: 4px solid var(--brand-success);
}

.retail-admin-wrapper .retail-success::before {
    content: '✓';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: bold;
}

.retail-admin-wrapper .retail-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--brand-danger);
    border-left: 4px solid var(--brand-danger);
}

.retail-admin-wrapper .retail-error::before {
    content: '⚠';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: bold;
}

/* Modal Message Boxes */
.retail-modal-content #modal-message-box {
    margin: 0 0 16px 0;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-bold);
    border: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.3s ease-out;
}

.retail-modal-content #modal-message-box.retail-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border-left: 4px solid #16a34a;
}

.retail-modal-content #modal-message-box.retail-success::before {
    content: '✓';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: bold;
}

.retail-modal-content #modal-message-box.retail-error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 4px solid #dc2626;
}

.retail-modal-content #modal-message-box.retail-error::before {
    content: '⚠';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: bold;
}

/* Toast Notifications */
.retail-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--z-toast);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-bold);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    position: relative;
    overflow: hidden;
}

.retail-toast.retail-success {
    background: rgba(34, 197, 94, 0.9);
    color: white;
    border-left: 4px solid #16a34a;
}

.retail-toast.retail-success::before {
    content: '✓';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: bold;
}

.retail-toast.retail-error {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border-left: 4px solid #dc2626;
}

.retail-toast.retail-error::before {
    content: '⚠';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: bold;
}

/* === FILTER LAYOUTS === */

.retail-filter-section {
    margin-bottom: 16px;
}

.retail-filter-row-flex {
    display: flex;
    gap: 12px;
    align-items: center;
}

.retail-filter-status-row {
    margin-bottom: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.retail-filter-actions {
    margin-left: auto;
}

.retail-filter-label {
    font-weight: bold;
}

.retail-filter-row-flex .sede-filter {
    accent-color: var(--brand-primary, #ec8a41);
}

.retail-filter-row-flex .retail-filter-label {
    font-weight: bold;
    color: inherit;
}

/* === RESPONSIVE DESIGN === */

@media (max-width: 768px) {
    .category-tab-bar {
        padding: 6px 8px;
        gap: 4px;
    }

    .category-tab {
        padding: 8px 12px;
        font-size: 13px;
        min-width: fit-content;
    }

    .sede-tab-bar {
        padding: 6px 8px;
        gap: 4px;
        margin-bottom: 16px;
    }

    .sede-tab {
        padding: 8px 12px;
        font-size: 13px;
    }

    .retail-orders-search-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-input-container {
        min-width: unset;
    }

    .pagination-size-selector {
        justify-content: center;
    }

    .pagination-controls {
        gap: 4px;
    }

    .addon-options-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }

    .addon-option {
        padding: 10px 12px;
        min-height: 40px;
        font-size: 13px;
    }

    .product-category-carousel .carousel-track {
        padding: 8px 12px !important;
    }

    .product-category-carousel .carousel-card {
        min-width: 120px;
        height: 45px;
        margin-right: 6px;
    }

    .product-category-carousel .carousel-card .card-content {
        padding: 6px 10px;
    }

    .product-category-carousel .carousel-card .card-label {
        font-size: 0.8rem;
    }

    .carousel-row-label {
        font-size: 0.8rem;
        margin-left: 12px;
    }

    .carousel-container {
        padding: 15px;
        margin: 15px 0;
    }

    .carousel-track {
        padding: 15px 20px;
        gap: 10px;
    }

    .carousel-card {
        min-width: 140px;
        height: 40px;
    }

    .card-label {
        font-size: 12px;
    }

    .sede-carousel .carousel-card {
        min-width: 150px;
    }

    .category-carousel .carousel-track,
    #category-tabs.carousel-track.category-tab-bar {
        padding: 15px 20px !important;
        scroll-snap-type: none !important;
    }
}

@media (max-width: 480px) {
    .category-tab-bar {
        padding: 4px 6px;
        gap: 3px;
    }

    .category-tab {
        padding: 6px 8px;
        font-size: 12px;
        min-width: fit-content;
    }

    .sede-tab-bar {
        padding: 4px 6px;
        gap: 3px;
        margin-bottom: 12px;
    }

    .sede-tab {
        padding: 6px 8px;
        font-size: 12px;
    }

    .retail-orders-search-wrapper {
        padding: 16px 20px;
    }

    .addon-options-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }

    .addon-option {
        padding: 8px 10px;
        min-height: 36px;
        font-size: 12px;
    }

    .addon-option:has(input:checked)::after {
        width: 14px;
        height: 14px;
        font-size: 10px;
        top: 3px;
        right: 4px;
    }

    .product-category-rows {
        gap: 6px;
    }

    .product-category-carousel .carousel-track {
        padding: 6px 10px !important;
    }

    .product-category-carousel .carousel-card {
        min-width: 100px;
        height: 40px;
        margin-right: 4px;
    }

    .product-category-carousel .carousel-card .card-content {
        padding: 4px 8px;
    }

    .product-category-carousel .carousel-card .card-label {
        font-size: 0.75rem;
    }

    .carousel-row-label {
        font-size: 0.75rem;
        margin-left: 10px;
    }

    .carousel-container {
        padding: 10px;
        margin: 10px 0;
    }

    .carousel-track {
        padding: 15px 15px;
        gap: 8px;
    }

    .carousel-card {
        min-width: 120px;
        height: 40px;
    }

    .card-content {
        padding: 5px;
    }

    .card-label {
        font-size: 11px;
        line-height: 1.2;
    }

    .category-carousel .carousel-track,
    #category-tabs.carousel-track.category-tab-bar {
        padding: 15px 15px !important;
        scroll-snap-type: none !important;
    }
}

/* === TOUCH DEVICE ENHANCEMENTS === */

@media (hover: none) and (pointer: coarse) {
    .carousel-card:hover {
        transform: none;
    }

    .carousel-card:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* === ACCESSIBILITY === */

.carousel-card:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* === LOADING STATES === */

.carousel-track.loading {
    opacity: 0.6;
    pointer-events: none;
}

.carousel-track.loading .carousel-card {
    animation: shimmer 1.5s ease-in-out infinite;
}