/* assets/css/product_details.css */

/* --- 1. GLOBAL SETTINGS --- */
body.product-page {
    background-color: #fff !important;
    color: #333 !important;
    font-family: 'Inter', sans-serif !important;
}

.product-detail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    padding: 40px 0;
    align-items: flex-start;
}

/* --- 2. LEFT COLUMN (IMAGE) --- */
.product-left {
    flex: 1.5;
    min-width: 300px;
}

.main-image-wrapper {
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: #fff;
    position: relative;
    min-height: 450px;
}

.main-image {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    width: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.5s ease;
}

.main-image-wrapper:hover .main-image {
    transform: scale(1.05);
}

/* --- 3. RIGHT COLUMN (INFO) --- */
.product-right {
    flex: 1;
    min-width: 350px;
}

/* Headings */
.product-brand-logo {
    font-size: 12px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 2px;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

.product-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #000;
    text-transform: uppercase;
}

/* Rating */
.rating-mock {
    color: #f4c740;
    font-size: 14px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.rating-text { color: #666; font-size: 13px; margin-left: 5px;}

/* --- 4. CONFIGURATION BOX (Alensa Style) --- */
.config-box {
    background: #fbfbfb;
    border: 1px solid #e1e1e1;
    padding: 25px;
    border-radius: 6px;
    margin-bottom: 25px;
}

.config-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.config-item {
    flex: 1;
}

.config-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.config-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #000;
    background: #fff;
    cursor: pointer;
    height: 42px;
}

.config-select:disabled {
    background-color: #e9ecef;
    color: #6c757d;
}

.config-select:focus { outline: 2px solid #000; border-color: #000; }

/* --- 5. SECOND EYE BUTTON & SECTION --- */
.eye-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #253746;
    text-transform: uppercase;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
    margin-bottom: 15px;
    display: none; /* Hidden by default */
}

.second-eye-box {
    display: none; /* Hidden by default */
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ccc;
    background-color: #fdfdfd;
}

/* The specific button styling missing in your screenshot */
.btn-second-eye {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid #000;
    color: #000;
    font-weight: 600;
    font-size: 13px;
    margin-top: 20px;
    cursor: pointer;
    border-radius: 4px;
    text-transform: uppercase;
    transition: 0.2s;
}

.btn-second-eye:hover {
    background: #000;
    color: #fff;
}

/* --- 6. STOCK & PRICE --- */
.stock-info {
   /* background: #eaf7f2;*/
    color: #007f5f;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    /*border: 1px solid #bcead9;*/
}

.stock-status { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.stock-status i { font-size: 16px; }

.price-area {
    margin-bottom: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.wholesale-label {
    font-size: 12px; color: #888; display: block; margin-bottom: 5px;
}

.product-price {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #DF4661; /* Alensa Red */
}

/* --- 7. ADD TO CART BUTTON (Green) --- */
.btn-add-basket {
    width: 100%;
    padding: 16px;
    background-color: #000; /* Emerald Green */
    color: #fff !important; /* Force White Text */
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.2s;
}

.btn-add-basket:hover {
    background-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-add-basket i { font-size: 18px; }

/* --- 8. SPECS TABLE --- */
.product-specs { margin-top: 60px; padding-top: 40px; border-top: 1px solid #eee; }
.product-specs h2 { font-size: 24px; font-family: 'Playfair Display', serif; margin-bottom: 20px; border-bottom: 2px solid #000; display: inline-block; padding-bottom: 10px; }
.specs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs-table tr { border-bottom: 1px solid #f5f5f5; }
.specs-table th { width: 30%; text-align: left; padding: 15px 0; color: #666; font-weight: 500; }
.specs-table td { padding: 15px 0; color: #000; font-weight: 600; }

/* Dimensions Icons */
.dimensions-box { display: flex; justify-content: space-between; margin-top: 20px; padding-top: 20px; border-top: 1px solid #e5e5e5; }
.dim-item { text-align: center; color: #555; }
.dim-icon { font-size: 24px; margin-bottom: 8px; opacity: 0.6; display: block; }
.dim-val { font-size: 14px; font-weight: 600; }



/* --- OPTICAL LENSES GRID (VISIANN) --- */
.optical-grid {
    width: 100%;
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
}

.optical-row {
    display: flex;
    border-bottom: 1px solid #eee;
}

.optical-row:last-child { border-bottom: none; }

.optical-cell {
    flex: 1;
    padding: 10px;
    border-right: 1px solid #eee;
    background: #fff;
}
.optical-cell:last-child { border-right: none; }

.optical-header .optical-cell {
    background: #f9f9f9;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    color: #666;
    text-align: center;
}

.eye-label {
    font-weight: 800;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fcfcfc;
}

.optical-input {
    width: 100%;
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
}

/* --- EDIT MODAL (CART) --- */
.edit-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.edit-modal {
    background: #fff;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.edit-modal h3 { margin-top: 0; font-family: 'Playfair Display'; }
.edit-textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    margin: 15px 0;
}
.btn-save-edit {
    width: 100%;
    padding: 12px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 700;
}
/* assets/css/product_details.css */

/* ... (Keep your existing styles) ... */

/* --- NEW: GLASS LENS GRID (VISIANN) --- */
.optical-grid {
    display: grid;
    grid-template-columns: 50px 1fr 1fr 1fr 1fr; /* Labels + 4 Inputs */
    gap: 10px;
    margin-bottom: 20px;
    background: #fcfcfc;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 6px;
}

.optical-header {
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 5px;
}

.eye-label-box {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    background: #000;
    color: #fff;
    border-radius: 4px;
}

.optical-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
}

/* --- UPDATE: QUANTITY INPUT (For Unit Selling) --- */
.qty-input-field {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

/* Hide Number Arrows */
.qty-input-field::-webkit-outer-spin-button,
.qty-input-field::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* --- 360 VIEWER --- */
.viewer-360-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    display: none; /* Hidden by default */
    background: #fff;
}

.img-360 {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
}

/* Loading State */
.loading-360::after {
    content: 'Loading 360°...';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #1e3d93;
}

/* 360 Toggle Button */
.btn-360-toggle {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #fff;
    border: 1px solid #1e3d93;
    border-radius: 30px;
    padding: 8px 15px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
    color: #1e3d93;
}

.btn-360-toggle:hover {
    border-color: #1e3d93;
    transform: scale(1.05);
}

.btn-360-toggle.active {
    background: #1e3d93;
    color: #fff;
    border-color: #1e3d93;
}

/* Icon rotation animation */
.icon-360 {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    display: inline-block;
}

/* COLOR SELECTOR */
.color-options-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.color-option-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: capitalize;
}

.color-option-btn:hover {
    border-color: #000;
}

/* Selected State (Black) */
.color-option-btn.selected {
    /*background: #000;*/
    color: #fff;
    border-color: #000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Hidden input to store value */
#selected_color { display: none; }
/* RESPONSIVE */
@media (max-width: 991px) {
    .product-detail-container { flex-direction: column; gap: 30px; }
    .product-right { width: 100%; }
    .main-image-wrapper { min-height: 300px; padding: 20px; }
    .config-row { gap: 10px; }
    .config-select { padding: 8px; font-size: 13px; }
}

/* --- COLOR VARIANT THUMBNAILS --- */
.color-options-wrapper { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
    margin-top: 8px; 
    margin-bottom: 15px; 
}

.color-option-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    /* Optional: Forces buttons to take up half the width on mobile to look organized */
    flex: 1 1 calc(50% - 10px); 
    min-width: 140px;
}

.color-option-btn:hover { 
    border-color: #999; 
    /*background: #fdfdfd;*/
}

/* The Selected State (Bold Border instead of Solid Black) */
.color-option-btn.selected { 
    border: 2px solid #000; 
    /*background: #f9f9f9;*/
    padding: 5px 11px 5px 5px; /* Adjust padding to offset the 2px border */
}

.color-thumb {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    mix-blend-mode: multiply; /* Removes grey backgrounds from Nova/Trussardi */
}

.color-name {
    font-size: 12px;
    font-weight: 600;
    color: #444;
    text-transform: capitalize;
    line-height: 1.2;
}

.color-option-btn.selected .color-name {
    color: #000;
}