/* Luxury Lingerie Theme (Charcoal Black & Gold) */
:root {
    --bg-color: #111112;
    --secondary-bg-color: #18181a;
    --text-color: #fdfbf7;
    --hint-color: #a0a0a5;
    --link-color: #d4af37;
    --button-color: #d4af37;
    --button-text-color: #111112;
    --accent-gold: #d4af37;
    --accent-rose: #b76e79;
    
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.06);
    --border-radius: 16px;
    --glass-shadow: 0 12px 32px 0 rgba(0, 0, 0, 0.5);
    --transition-speed: 0.25s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 30px;
}

/* Header Navigation */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(17, 17, 18, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    padding: 12px 16px;
}

.tabs-navigation {
    display: flex;
    gap: 12px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 12px;
    color: var(--hint-color);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.tab-btn:hover {
    color: var(--text-color);
}

.tab-btn.active {
    background: var(--accent-gold);
    color: var(--button-text-color);
    border-color: var(--accent-gold);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
    font-weight: 600;
}

.tab-icon {
    transition: transform 0.2s ease;
}

.tab-btn:active .tab-icon {
    transform: scale(0.85);
}

.cart-icon-wrapper {
    position: relative;
    display: inline-flex;
}

.badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: var(--accent-rose);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    padding: 2px 6px;
    min-width: 18px;
    text-align: center;
    transition: all 0.3s ease;
}

.badge.hide {
    transform: scale(0);
    opacity: 0;
}

/* App Content Area */
.app-content {
    flex: 1;
    padding: 16px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Search and Scan Panel */
.search-section {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-bar {
    position: relative;
}

#search-input {
    width: 100%;
    background-color: var(--secondary-bg-color);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 16px 48px 16px 18px;
    color: var(--text-color);
    font-size: 15px;
    outline: none;
    transition: all var(--transition-speed) ease;
}

#search-input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.1);
}

#search-input::placeholder {
    color: var(--hint-color);
}

.clear-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--hint-color);
    padding: 4px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-btn:hover {
    color: var(--text-color);
    background-color: var(--card-bg);
}

.clear-btn.hide {
    display: none;
}

.scan-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scan-btn {
    height: 52px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.test-selector-wrapper {
    position: relative;
}

#test-barcode-selector {
    width: 100%;
    background-color: var(--secondary-bg-color);
    border: 1px solid var(--card-border);
    color: var(--hint-color);
    padding: 12px;
    border-radius: 12px;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23a0a0a5' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* Product details main block */
.product-preview-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.preview-left {
    flex-shrink: 0;
    width: 110px;
    height: 147px; /* 3:4 aspect ratio */
    border-radius: 12px;
    overflow: hidden;
    background-color: #1c1c1e;
    border: 1px solid var(--card-border);
}

.product-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.product-brand-title {
    font-family: 'Playfair Display', serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
}

.product-sku-code {
    font-size: 12px;
    color: var(--hint-color);
    font-family: monospace;
}

.product-variant-info {
    font-size: 13px;
    color: var(--accent-rose);
}

.price-container {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 4px;
}

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

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

.add-reserve-btn {
    width: 100%;
    height: 50px;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 20px;
}

/* Accordion sections */
.accordion-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 16px 18px;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.accordion-badge-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stock-total-badge {
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent-gold);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.accordion-arrow {
    transition: transform var(--transition-speed) ease;
    color: var(--hint-color);
}

.accordion-header.active .accordion-arrow {
    transform: rotate(180deg);
    color: var(--accent-gold);
}

.accordion-content {
    padding: 0 18px 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    animation: slideDown var(--transition-speed) ease forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.store-stock-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 10px;
}

.store-stock-list li {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    align-items: center;
}

.store-name-marker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.store-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981; /* Green */
}

.store-qty {
    font-weight: 600;
    color: var(--text-color);
}

/* Interactive Size / Color Matrix */
.matrix-section {
    margin-bottom: 24px;
}

.matrix-section h2 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--hint-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.matrix-table-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
}

.matrix-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--hint-color);
    border-bottom: 1px solid var(--card-border);
}

.matrix-table td {
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
}

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

.matrix-color-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-dot-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--card-border);
}

.color-name-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

.matrix-sizes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.size-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    min-width: 44px;
    text-align: center;
    transition: all 0.2s ease;
}

.size-btn:hover {
    border-color: var(--accent-gold);
}

.size-btn.active {
    background-color: var(--accent-gold);
    color: var(--button-text-color);
    border-color: var(--accent-gold);
    font-weight: 600;
}

.size-btn.out-of-stock {
    opacity: 0.35;
    background-color: transparent;
    text-decoration: line-through;
}

/* Locked Anchor Filters */
.filters-anchors-section {
    background: var(--card-bg);
    border: 1px dashed var(--card-border);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 24px;
}

.filters-anchors-section h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.filter-tip {
    font-size: 12px;
    color: var(--hint-color);
    margin-bottom: 14px;
}

.filters-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.filter-chip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip.locked {
    border-color: var(--accent-gold);
    background-color: rgba(212, 175, 55, 0.04);
}

.filter-label {
    font-size: 13px;
    color: var(--text-color);
}

.filter-label strong {
    color: var(--accent-gold);
    margin-left: 4px;
}

.lock-icon {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.filter-chip:active .lock-icon {
    transform: scale(0.85);
}

.find-similar-btn {
    width: 100%;
    height: 48px;
    font-weight: 600;
    font-size: 14px;
}

/* Similar Products Slider */
.similar-products-section {
    margin-bottom: 24px;
}

.similar-products-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.similar-products-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.similar-products-slider::-webkit-scrollbar {
    display: none;
}

.sim-card {
    flex: 0 0 150px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
}

.sim-img-box {
    width: 100%;
    height: 160px;
    border-radius: 8px;
    overflow: hidden;
    background: #1c1c1e;
}

.sim-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sim-name {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 32px;
    color: var(--text-color);
}

.sim-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-gold);
}

/* Details and composition body */
.details-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 10px;
    font-size: 14px;
}

.details-body strong {
    color: var(--accent-gold);
}

.product-composition {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.01);
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 2px solid var(--accent-gold);
}

.product-description {
    color: var(--hint-color);
    font-size: 13px;
}

.product-gallery-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.gallery-img-box {
    flex: 0 0 80px;
    height: 107px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Primary Button Design */
.primary-btn {
    background: var(--button-color);
    color: var(--button-text-color);
    border: none;
    border-radius: var(--border-radius);
    padding: 14px 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: opacity var(--transition-speed) ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.primary-btn:active {
    opacity: 0.85;
}

.secondary-btn {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--accent-gold);
    border-radius: var(--border-radius);
    padding: 14px 20px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.secondary-btn:hover {
    background: rgba(212, 175, 55, 0.05);
}

.secondary-btn:active {
    background: rgba(212, 175, 55, 0.15);
}

.btn-block {
    width: 100%;
}

/* Cart Elements styling */
#cart-items-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

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

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-gold);
}

.cart-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--secondary-bg-color);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 4px;
}

.control-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: var(--card-bg);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
}

.control-btn:active {
    background-color: var(--card-border);
}

.cart-qty {
    font-size: 14px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

/* Cart Summary Card */
.cart-summary-card {
    background: rgba(212, 175, 55, 0.03);
    border: 1px dashed var(--accent-gold);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.total-price-row {
    font-size: 17px;
    font-weight: 700;
    border-top: 1px solid var(--card-border);
    padding-top: 10px;
}

.total-price-row span:last-child {
    color: var(--accent-gold);
}

/* Modal overlays */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    transition: opacity 0.3s ease;
}

.modal-overlay.hide {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    width: 100%;
    background-color: var(--secondary-bg-color);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    border-top: 1px solid var(--card-border);
    padding: 24px 16px 36px 16px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.6);
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.1, 0.76, 0.55, 0.94);
}

.modal-overlay.hide .modal-content {
    transform: translateY(100%);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--hint-color);
    cursor: pointer;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--hint-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .form-group textarea {
    width: 100%;
    background-color: var(--bg-color);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 14px;
    color: var(--text-color);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-gold);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Success modal custom styling */
.success-modal-content {
    text-align: center;
    padding: 36px 24px;
    background: linear-gradient(135deg, #181c18 0%, #111411 100%) !important;
    border-top: 2px solid #10b981 !important;
    color: var(--text-color) !important;
}

.success-icon-ring {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: rgba(16, 185, 129, 0.15);
    border: 2px solid #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
    margin: 0 auto 20px;
    animation: success-scale 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.success-check-svg {
    width: 36px;
    height: 36px;
}

@keyframes success-scale {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.success-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #e6fcf5;
}

.success-order-id {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px dashed rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #34d399;
    margin-bottom: 16px;
    font-family: monospace;
}

.cart-details-info {
    font-size: 13px;
    color: var(--hint-color);
    margin-bottom: 12px;
}

.magento-cart-badge {
    display: block;
    margin-top: 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-gold);
    font-family: monospace;
}

.success-text {
    font-size: 14px;
    line-height: 1.6;
    color: #a7f3d0;
    margin-bottom: 24px;
}

.success-close-btn {
    background-color: #059669 !important;
    border: none;
    color: white !important;
}

.success-close-btn:active {
    background-color: #047857 !important;
}

/* Spinner Loaders */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.05);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border-left-color: var(--accent-gold);
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.placeholder-icon {
    color: var(--accent-gold);
    opacity: 0.25;
    margin-bottom: 16px;
}

.hide {
    display: none !important;
}

/* Care Attributes Styling */
.care-attributes-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(255, 255, 255, 0.01);
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 2px solid var(--accent-rose);
    margin-bottom: 12px;
    margin-top: 6px;
}
.care-attributes-list li {
    font-size: 13px;
    color: var(--hint-color);
}
.care-attributes-list li strong {
    color: var(--text-color);
    font-weight: 500;
}
