/* Modern Blue & White Glassmorphism Theme - Senior Frontend Engineer Edition */
:root {
    /* Color Palette */
    --primary-color: #3b82f6; /* Modern Bright Blue */
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --primary-hover: #2563eb;
    --primary-light: #eff6ff; /* Very light blue for backgrounds */
    --secondary-text: #64748b;
    --main-text: #1e293b;
    --heading-text: #0f172a;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --glass-blur: blur(12px);
    
    /* Layout & Spacing */
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --input-height: 44px; /* Taller, more "grand" inputs */
    --btn-height: 50px;
    
    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background: #f0f4f8;
    background-image: 
        radial-gradient(at 0% 0%, hsla(210,100%,93%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(220,100%,96%,1) 0, transparent 50%), 
        radial-gradient(at 100% 100%, hsla(200,100%,94%,1) 0, transparent 50%);
    background-attachment: fixed;
    color: var(--main-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    margin: 0;
}

#app {
    padding: 20px 0 60px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Layout Structure --- */
.page-container {
    display: flex;
    gap: 30px;
    position: relative;
    /* padding: 0; */ /* Removed padding that might conflict with layout */
}

.page-left {
    flex: 1;
    min-width: 0; /* Prevent flex overflow */
}

.page-right {
    width: 380px;
    flex-shrink: 0;
}

/* --- Cards & Containers (Glass Style) --- */
.product-header-box,
.product-main-box,
.page-right {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    transition: var(--transition-base);
}

.product-header-box {
    padding: 24px 32px;
    font-size: 24px;
    font-weight: 700;
    color: var(--heading-text);
    display: flex;
    align-items: center;
    background: linear-gradient(to right, rgba(255,255,255,0.9), rgba(255,255,255,0.6));
}

.product-main-box {
    padding: 32px;
}

.product-main-box-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--heading-text);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: relative;
}

.product-main-box-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

/* --- Form Items & Typography --- */
.item-box {
    display: flex;
    align-items: flex-start; /* Better alignment for multiline */
    margin-bottom: 30px;
}

.item-box:last-child {
    margin-bottom: 0;
}

.item-title {
    width: 100px;
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--secondary-text);
    padding-top: 10px; /* Align with input height */
    margin-right: 20px;
}

/* --- Customized Element UI Components --- */

/* Radio Buttons - The "Atmospheric" Look */
.el-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.el-radio-button {
    box-shadow: none !important;
    margin: 0 !important;
}

.el-radio-button__inner {
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--radius-md) !important;
    padding: 0 24px !important;
    height: var(--input-height) !important;
    line-height: var(--input-height) !important;
    font-size: 14px !important;
    background: #fff !important;
    color: var(--secondary-text) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    transition: var(--transition-base) !important;
    font-weight: 500;
    min-width: 100px;
}

/* STRONG Overrides for Red Borders from Common.css */
body .el-radio-button__orig-radio:checked + .el-radio-button__inner {
    background: var(--primary-light) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15) !important;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

body .el-radio-button__inner:hover {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    transform: translateY(-1px);
}

/* Hide the vertical separators Element puts between radio buttons */
.el-radio-button:first-child .el-radio-button__inner,
.el-radio-button:last-child .el-radio-button__inner {
    border-radius: var(--radius-md) !important;
}

/* Select Dropdowns */
.el-select {
    width: 100%;
    max-width: 320px;
}

.el-input__inner {
    height: var(--input-height) !important;
    line-height: var(--input-height) !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    padding-left: 16px !important;
    font-size: 14px !important;
    transition: var(--transition-base) !important;
}

.el-input__inner:hover {
    border-color: #cbd5e1 !important;
}

/* Override Red Border on Focus */
body .el-input.is-active .el-input__inner, 
body .el-input__inner:focus,
body .el-select .el-input.is-focus .el-input__inner,
body .el-select .el-input__inner:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Dropdown Items Selected State Override */
body .el-select-dropdown__item.selected {
    color: var(--primary-color) !important;
}

/* Sliders */
.el-slider__runway {
    height: 8px !important;
    background-color: #e2e8f0 !important;
    border-radius: 4px !important;
    margin: 18px 0 !important;
}

body .el-slider__bar {
    height: 8px !important;
    background: var(--primary-gradient) !important;
    border-radius: 4px !important;
    background-color: transparent !important; /* Override common.css solid color */
}

.el-slider__button-wrapper {
    top: -8px !important;
}

body .el-slider__button {
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #fff !important;
    background-color: var(--primary-color) !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
    transition: transform 0.2s !important;
}

.el-slider__button:hover, .el-slider__button.dragging {
    transform: scale(1.2);
}

/* Fixed Value (Tag Style - No Border) */
.fixed-value {
    display: inline-flex;
    align-items: center;
    height: var(--input-height);
    padding: 0 20px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    border: none; /* No border as requested */
}

/* Input Number */
.el-input-number {
    line-height: var(--input-height) !important;
    width: 160px !important;
}
.el-input-number .el-input__inner {
    text-align: center !important;
    padding: 0 !important;
}
.el-input-number__decrease, .el-input-number__increase {
    height: auto !important;
    bottom: 1px !important;
    top: 1px !important;
    width: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    color: var(--secondary-text) !important;
}
body .el-input-number__decrease:hover, 
body .el-input-number__increase:hover {
    color: var(--primary-color) !important;
}

/* Textarea */
.note-textarea textarea {
    padding: 12px 16px !important;
    border-radius: var(--radius-md) !important;
    border-color: #e2e8f0 !important;
    font-family: inherit;
}
body .note-textarea textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* --- Right Side: Price Card --- */
.page-right {
    position: sticky;
    top: 20px;
    padding: 30px;
    background: #fff; /* Solid background for better contrast on price */
    border: 1px solid rgba(255,255,255,0.8);
}

.config-box-title {
    text-align: left;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.config-box-title div:first-child {
    font-size: 20px;
    font-weight: 700;
    color: var(--heading-text);
}

.config-box-title div:nth-child(2) {
    font-size: 13px;
    color: var(--secondary-text);
    margin-top: 6px;
}

.page-right-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #f1f5f9;
    font-size: 14px;
}

.page-right-item div:first-child {
    color: var(--secondary-text);
}

.page-right-item div:last-child {
    font-weight: 600;
    color: var(--heading-text);
}

.page-right-item div:last-child span {
    color: var(--primary-color);
}

/* Price Section */
.page-right-item-price {
    font-size: 36px !important;
    font-weight: 800 !important;
    color: var(--primary-color) !important;
    text-shadow: 0 2px 10px rgba(59, 130, 246, 0.2);
    letter-spacing: -0.5px;
}

.page-right-tips {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin: 20px 0;
}

/* Buy Button - The Star of the Show */
body .buy-btn {
    width: 100%;
    height: var(--btn-height) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: var(--radius-md) !important;
    background: var(--primary-gradient) !important;
    border: none !important;
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4) !important;
    transition: all 0.3s ease !important;
    letter-spacing: 0.5px;
}

body .buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(59, 130, 246, 0.5) !important;
}

body .buy-btn:active {
    transform: translateY(0);
}

.buy-btn1 {
    width: 100%;
    height: var(--btn-height) !important;
    border-radius: var(--radius-md) !important;
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    border: none !important;
}

/* --- Breadcrumb --- */
.breadcrumb-box {
    margin-bottom: 24px;
    padding: 0; /* Remove padding as it's inside common-layout */
}
.el-breadcrumb__inner {
    font-weight: 400 !important;
    color: var(--secondary-text) !important;
}
.el-breadcrumb__item:last-child .el-breadcrumb__inner {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
}

/* --- Specific Components --- */
/* OS Selection (System Box) */
.system-box {
    display: flex;
    gap: 16px;
}

.system-item-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* Hard Disk Unit Label */
.harddisk-unit {
    margin-left: 12px;
    color: var(--secondary-text);
    font-size: 14px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    .page-container {
        flex-direction: column;
    }
    .page-right {
        width: 100%;
        position: static;
        margin-top: 20px;
    }
    .el-select {
        max-width: 100%;
    }
}

/* Breadcrumb Icons */
.el-breadcrumb__item i {
    margin-right: 4px;
    font-size: 14px;
}
.el-breadcrumb__item:last-child i {
    color: var(--primary-color);
}

/* Price Tooltip on Hover - Correct Implementation */
.el-radio-button__inner {
    position: relative !important; /* Ensure relative positioning for tooltip anchor */
    overflow: visible !important; /* Allow tooltip to overflow */
}

.option-price-tag {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background-color: rgba(30, 41, 59, 0.9); /* Dark slate background */
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    line-height: 1.4;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

/* Tooltip Arrow */
.option-price-tag::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(30, 41, 59, 0.9) transparent transparent transparent;
}

/* Show on Hover */
.el-radio-button__inner:hover .option-price-tag {
    display: block;
    animation: tooltipFadeIn 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Fix Slider Layout & Style */
.harddisk-box {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 10px; /* Space above */
    padding: 0 10px; /* Inner padding */
}

/* Force Slider to take available space */
.harddisk-box .el-slider {
    flex: 1 !important;
    width: auto !important; /* Override inline 80% */
    margin-right: 20px !important;
}

/* Fix Input Number overlapping */
.el-slider__input {
    width: 100px !important; /* Ensure input has space */
}

/* Unit Label */
.harddisk-unit {
    margin-left: 0 !important; /* Remove margin as input handles spacing */
    width: 40px; /* Fixed width for unit */
    text-align: left;
    font-weight: 600;
    color: var(--secondary-text);
}

/* Enhanced Slider Style */
.el-slider__runway {
    height: 10px !important; /* Thicker track */
    border-radius: 5px !important;
    background-color: #e2e8f0 !important;
}

.el-slider__bar {
    height: 10px !important;
    border-radius: 5px !important;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%) !important;
}

.el-slider__button {
    width: 24px !important;
    height: 24px !important;
    border: 3px solid #fff !important;
    background-color: #2563eb !important;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3) !important;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important; /* Bounce effect */
}

.el-slider__button:hover,
.el-slider__button.dragging {
    transform: scale(1.3);
}

/* Input inside slider */
.el-slider__input .el-input__inner {
    height: 36px !important;
    line-height: 36px !important;
    border-radius: 8px !important;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.el-slider__input .el-input__inner:focus {
    border-color: var(--primary-color) !important;
    background: #fff !important;
}

/* Decrement/Increment Buttons inside Input */
.el-input-number__decrease, 
.el-input-number__increase {
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
}

.el-input-number__decrease:hover, 
.el-input-number__increase:hover {
    color: var(--primary-color) !important;
}

/* --- Refined Slider Layout matching the design requirement --- */
.harddisk-box {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 10px;
    padding: 0;
}

/* 1. Slider Track Area (Occupies most space) */
.harddisk-box .el-slider {
    flex: 1 !important;
    width: auto !important;
    margin-right: 20px !important;
    position: relative;
}

/* Force tooltip to display on hover of the slider button */
.el-slider__button-wrapper {
    z-index: 100 !important;
}

/* Ensure the native Element UI tooltip is visible and styled correctly */
.el-tooltip__popper.is-dark {
    background: #3b82f6 !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: 6px;
    padding: 6px 12px;
}
.el-tooltip__popper[x-placement^=top] .popper__arrow::after {
    border-top-color: #3b82f6 !important;
}
.el-tooltip__popper[x-placement^=top] .popper__arrow {
    border-top-color: #3b82f6 !important;
}

/* 2. Numeric Stepper Input (Fixed size, next to slider) */
.harddisk-box .el-slider__input {
    width: 120px !important;
    margin-right: 20px; /* Space between input and unit */
    float: none !important; /* Override element ui float */
    position: relative !important;
    display: inline-block !important;
}

.harddisk-box .el-slider__runway.show-input {
    margin-right: 140px !important; /* Make room for the input */
}

.el-slider__input .el-input__inner {
    height: 38px !important;
    line-height: 38px !important;
    border-radius: 6px !important;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
}

/* Stepper Buttons inside the input */
.el-slider__input .el-input-number__decrease, 
.el-slider__input .el-input-number__increase {
    width: 32px !important;
    background: #f8fafc !important;
    border: none !important;
    color: #94a3b8 !important;
    height: 36px !important;
    top: 1px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.el-slider__input .el-input-number__decrease {
    left: 1px !important;
    border-radius: 6px 0 0 6px !important;
    border-right: 1px solid #f1f5f9 !important;
}

.el-slider__input .el-input-number__increase {
    right: 1px !important;
    border-radius: 0 6px 6px 0 !important;
    border-left: 1px solid #f1f5f9 !important;
}

/* 3. Unit and Subtext Area (Rightmost) */
.harddisk-unit-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 45px; /* Ensure it doesn't get squished */
}

.unit-main {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.2;
}

.unit-sub {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
    line-height: 1.2;
}

/* Refined Slider Track & Thumb */
.el-slider__runway {
    height: 6px !important;
    border-radius: 3px !important;
    background-color: #e2e8f0 !important;
    margin: 16px 0 !important; /* Vertical center alignment */
}

.el-slider__bar {
    height: 6px !important;
    border-radius: 3px !important;
    background: #3b82f6 !important;
}

.el-slider__button {
    width: 18px !important;
    height: 18px !important;
    border: 3px solid #fff !important;
    background-color: #3b82f6 !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4) !important;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.el-slider__button:hover,
.el-slider__button.dragging {
    transform: scale(1.2);
}

/* Adjust padding for selects with icons */
.system-box .el-select .el-input--prefix .el-input__inner {
    padding-left: 32px !important;
}

/* Ensure SVG icons inherit text color if no specific color is set */
.system-box .el-select svg {
    fill: currentColor;
}

/* Discount and Free Tags in Purchase Duration */
.discount-tag {
    color: var(--primary-color) !important; /* Blue theme color */
    font-weight: 600;
    margin-left: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.discount-tag.free-tag {
    color: #10b981 !important; /* Green for free to make it stand out positively */
}

.discount-tag i.fa-gift {
    font-size: 13px;
    animation: slight-bounce 2s infinite;
}

@keyframes slight-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

/* Override default element ui select dropdown height */
.auto-height-select .el-scrollbar__wrap {
    max-height: none !important;
    max-height: 500px !important; /* Allow it to grow significantly but not break the screen */
}

/* Remove Shopping Cart Icon from Buy Button */
.buy-btn i {
    display: none !important;
}
