/* ==========================================================================
   Product Detail - The Original Lab
   Diseño consistente con el resto del template
   ========================================================================== */

/* ===== BREADCRUMB ===== */
.wish_insignia__breadcrumb {
    margin: 0 auto;
    padding: 0 1.5rem;
}

.wish_insignia__breadcrumb-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 0;
    font-size: 0.875rem;
}

.wish_insignia__breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.wish_insignia__breadcrumb a:hover {
    color: #2319de;
}

.wish_insignia__breadcrumb-separator {
    color: #cbd5e1;
}

.wish_insignia__breadcrumb-current {
    color: #1a1a2e;
    font-weight: 600;
}

/* ===== PRODUCT DETAIL CONTAINER ===== */
.product-detail {
    max-width: 1280px;
    margin: 0 auto 3rem;
    padding: 2rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        padding: 2.5rem;
    }
}

/* ===== PRODUCT IMAGES ===== */
.product-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    width: 100%;
    aspect-ratio: 1;
    max-height: 550px;
    object-fit: contain;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid #e5e7eb;
}

.thumbnail-images {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.thumbnail {
    width: 80px;
    height: 80px;
    min-width: 80px;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    border-radius: 0.625rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.thumbnail:hover {
    border-color: #2319de;
    transform: translateY(-2px);
}

.thumbnail.active {
    border-color: #2319de;
    box-shadow: 0 4px 12px rgba(35, 25, 222, 0.2);
}

/* ===== PRODUCT INFO ===== */
.product-info {
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: #1a1a2e;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .product-title {
        font-size: 2rem;
    }
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.stars {
    color: #fbbf24;
    font-size: 1.125rem;
    letter-spacing: 2px;
}

.reviews {
    color: #64748b;
    font-size: 0.875rem;
}

/* ===== PRECIO CON OFERTA ===== */
.product-price {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.current-price {
    font-size: 2rem;
    font-weight: 800;
    color: #2319de;
}

.original-price {
    font-size: 1.25rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 400;
}

.discount-badge {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.currency {
    font-size: 0.9375rem;
    color: #64748b;
    font-weight: 500;
}

/* ===== PRODUCT FEATURES ===== */
.product-features {
    list-style: none;
    margin: 0 0 1.5rem 0;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    border-radius: 0.875rem;
    border: 1px solid #dbeafe;
}

.product-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(35, 25, 222, 0.1);
    font-size: 0.9375rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-features li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.product-features li:first-child {
    padding-top: 0;
}

.product-features li i {
    font-size: 1.125rem;
    color: #2319de;
    width: 1.5rem;
    text-align: center;
}

.product-sku {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    font-family: monospace;
    letter-spacing: 0.5px;
}

/* ===== SELECTOR DE VARIANTES ===== */
.product-variants {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #fafafa;
    border-radius: 0.875rem;
    border: 1px solid #e5e7eb;
}

.variant-group {
    margin-bottom: 1.5rem;
}

.variant-group:last-of-type {
    margin-bottom: 0;
}

.variant-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

/* Botones de variantes */
.variant-option {
    min-width: 50px;
    padding: 0.75rem 1.125rem;
    border: 2px solid #e5e7eb;
    background: white;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.variant-option:hover {
    border-color: #2319de;
    background: #f0f4ff;
}

.variant-option.selected {
    border-color: #2319de;
    background: linear-gradient(135deg, #2319de 0%, #1a1a2e 100%);
    color: white;
}

.variant-option:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f3f4f6;
}

/* ===== SWATCHES DE COLOR ===== */
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border: 2px solid transparent;
    border-radius: 0.625rem;
    transition: all 0.2s ease;
}

.color-option:hover {
    border-color: #e5e7eb;
    background: #f9fafb;
}

.color-option.selected {
    border-color: #2319de;
    background: #f0f4ff;
}

.color-swatch {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.color-option.selected .color-swatch {
    border-color: #2319de;
    box-shadow: 0 4px 12px rgba(35, 25, 222, 0.3);
    transform: scale(1.1);
}

.color-name {
    font-size: 0.6875rem;
    color: #64748b;
    text-align: center;
    font-weight: 500;
}

.color-option.selected .color-name {
    color: #2319de;
    font-weight: 700;
}

/* ===== MENSAJES DE VARIANTES ===== */
.variant-error {
    padding: 0.875rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 1rem;
    display: none;
    align-items: center;
    gap: 0.625rem;
}

.variant-error i {
    font-size: 1rem;
}

.selected-variant {
    display: none;
    padding: 0.875rem 1rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 0.5rem;
    color: #047857;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.selected-variant strong {
    font-weight: 700;
    margin-right: 0.5rem;
}

/* ===== QUANTITY SELECTOR ===== */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0; /* ✅ Quitamos margen, lo pondremos en product-actions */
    flex-wrap: nowrap;
    width: fit-content; /* ✅ Solo el ancho necesario */
}

/* ✅ Asegurar que quantity-selector no incluya los botones de acción */
.product-info > .quantity-selector {
    width: fit-content;
    flex: none;
}

.quantity-selector label {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 600;
    white-space: nowrap;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    background: white;
}

.quantity-controls button {
    background: #f8fafc;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a2e;
    transition: all 0.2s;
}

.quantity-controls button:hover {
    background: #2319de;
    color: white;
}

.quantity-controls input {
    border: none;
    width: 60px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.75rem 0.5rem;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    color: #1a1a2e;
    -moz-appearance: textfield;
}

.quantity-controls input::-webkit-outer-spin-button,
.quantity-controls input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ===== PRODUCT ACTIONS ===== */
.product-detail .product-actions,
.product-info .product-actions {
    display: flex !important;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem !important; /* ✅ Espacio arriba para separar de quantity */
    margin-bottom: 1.5rem;
    position: relative !important;
    opacity: 1 !important;
    transform: none !important;
    bottom: auto !important;
    right: auto !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
}

@media (min-width: 480px) {
    .product-detail .product-actions,
    .product-info .product-actions {
        flex-direction: row;
    }
}

.product-detail .btn-add-cart,
.product-detail .btn-buy-now,
.product-info .btn-add-cart,
.product-info .btn-buy-now {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0.625rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: auto; /* ✅ Override */
    height: auto; /* ✅ Override */
    position: relative; /* ✅ Override */
    opacity: 1; /* ✅ Override */
}

.product-detail .btn-add-cart,
.product-info .btn-add-cart {
    background: linear-gradient(135deg, #2319de 0%, #1a1a2e 100%);
    color: white;
}

.product-detail .btn-add-cart:hover,
.product-info .btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(35, 25, 222, 0.35);
}

.product-detail .btn-buy-now,
.product-info .btn-buy-now {
    background: white;
    color: #1a1a2e;
    border: 2px solid #1a1a2e;
}

.product-detail .btn-buy-now:hover,
.product-info .btn-buy-now:hover {
    background: #1a1a2e;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 26, 46, 0.25);
}

.product-detail .btn-add-cart:disabled,
.product-detail .btn-buy-now:disabled,
.product-info .btn-add-cart:disabled,
.product-info .btn-buy-now:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.product-detail .btn-add-cart i,
.product-detail .btn-buy-now i,
.product-info .btn-add-cart i,
.product-info .btn-buy-now i {
    font-size: 1.125rem;
}

/* ===== WISHLIST BUTTON ===== */
.wishlist-buttons-container {
    margin-bottom: 1.5rem;
    position: relative;
}

/* Mostrar botón simple por defecto, JS lo ocultará si hay wishlists */
.wishlist-buttons-container .btn-add-to-wishlist {
    display: flex; /* ✅ Visible por defecto */
}

/* Ocultar dropdown por defecto, JS lo mostrará si hay wishlists */
.wishlist-buttons-container .wishlist-dropdown-container {
    display: none; /* ✅ Oculto por defecto */
    width: 100%;
    position: relative;
}

.btn-add-to-wishlist,
.btn-add-to-wishlist-dropdown {
    width: 100%;
    padding: 0.875rem 1rem;
    background: transparent;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    color: #64748b;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add-to-wishlist:hover,
.btn-add-to-wishlist-dropdown:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

.btn-add-to-wishlist i,
.btn-add-to-wishlist-dropdown i {
    font-size: 1rem;
}

/* ===== WISHLIST DROPDOWN MENU (Detail Page) ===== */
.product-detail .wishlist-dropdown-menu,
.product-info .wishlist-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.product-detail .wishlist-dropdown-menu.show,
.product-info .wishlist-dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.product-detail .wishlist-dropdown-header,
.product-info .wishlist-dropdown-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: #1a1a2e;
}

.product-detail .wishlist-dropdown-close,
.product-info .wishlist-dropdown-close {
    width: 28px;
    height: 28px;
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
}

.product-detail .wishlist-dropdown-close:hover,
.product-info .wishlist-dropdown-close:hover {
    background: #ef4444;
    color: white;
}

.product-detail .wishlist-dropdown-lists,
.product-info .wishlist-dropdown-lists {
    max-height: 250px;
    overflow-y: auto;
}

.product-detail .wishlist-dropdown-loading,
.product-info .wishlist-dropdown-loading {
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
}

.product-detail .wishlist-dropdown-loading i,
.product-info .wishlist-dropdown-loading i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.product-detail .wishlist-list-item,
.product-info .wishlist-list-item {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-detail .wishlist-list-item:hover,
.product-info .wishlist-list-item:hover {
    background: #f8fafc;
}

.product-detail .wishlist-list-item:last-child,
.product-info .wishlist-list-item:last-child {
    border-bottom: none;
}

.product-detail .wishlist-list-name,
.product-info .wishlist-list-name {
    font-size: 0.9375rem;
    color: #1a1a2e;
    font-weight: 500;
}

.product-detail .wishlist-list-item.added,
.product-info .wishlist-list-item.added {
    background: #f0fdf4;
}

.product-detail .wishlist-list-item.added .wishlist-list-name,
.product-info .wishlist-list-item.added .wishlist-list-name {
    color: #10b981;
}

.product-detail .wishlist-list-item.added::after,
.product-info .wishlist-list-item.added::after {
    content: '✓';
    color: #10b981;
    font-weight: bold;
    font-size: 1rem;
}

.product-detail .wishlist-dropdown-footer,
.product-info .wishlist-dropdown-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #e5e7eb;
}

.product-detail .wishlist-create-new-btn,
.product-info .wishlist-create-new-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #1a1a2e;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.product-detail .wishlist-create-new-btn:hover,
.product-info .wishlist-create-new-btn:hover {
    background: #2319de;
}

/* ===== MODAL CREAR WISHLIST ===== */
.wishlist-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.wishlist-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.wishlist-modal {
    background: white;
    border-radius: 1rem;
    max-width: 400px;
    width: 100%;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.wishlist-modal-overlay.show .wishlist-modal {
    transform: scale(1);
}

.wishlist-modal h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wishlist-modal h3 i {
    color: #ef4444;
}

.wishlist-modal input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-family: inherit;
}

.wishlist-modal input[type="text"]:focus {
    outline: none;
    border-color: #2319de;
    box-shadow: 0 0 0 3px rgba(35, 25, 222, 0.1);
}

.wishlist-modal-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.wishlist-modal-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 0.875rem;
}

.wishlist-modal-btn.cancel {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #64748b;
}

.wishlist-modal-btn.cancel:hover {
    background: #e5e7eb;
}

.wishlist-modal-btn.confirm {
    background: #2319de;
    border: none;
    color: white;
}

.wishlist-modal-btn.confirm:hover {
    background: #1a1a2e;
}

/* ===== SPECIFICATIONS ===== */
.specifications-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    color: #1a1a2e;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.specifications-title::before {
    content: '';
    width: 4px;
    height: 1.25rem;
    background: linear-gradient(180deg, #2319de 0%, #1a1a2e 100%);
    border-radius: 2px;
}

.specifications-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.specifications-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
    color: #475569;
}

.specifications-list li:last-child {
    border-bottom: none;
}

/* ===== DESCRIPCIÓN DEL PRODUCTO ===== */
.product-description-section {
    max-width: 1280px;
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
}

.product-description-container {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

@media (min-width: 768px) {
    .product-description-container {
        padding: 2.5rem;
    }
}

.description-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #2319de;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.description-title::before {
    content: '';
    width: 5px;
    height: 1.5rem;
    background: linear-gradient(180deg, #2319de 0%, #1a1a2e 100%);
    border-radius: 3px;
}

.description-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #475569;
}

.description-content p {
    margin-bottom: 1.25rem;
}

.description-content p:last-child {
    margin-bottom: 0;
}

.no-description {
    color: #94a3b8;
    font-style: italic;
    text-align: center;
    padding: 2rem 0;
}

/* ===== GUARANTEE SECTION ===== */
.guarantee-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    text-align: center;
    padding: 4rem 1.5rem;
    margin: 0;
}

.guarantee-title {
    font-size: 4rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .guarantee-title {
        font-size: 5rem;
    }
}

.guarantee-subtitle {
    font-size: 0.875rem;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-weight: 600;
}

.guarantee-stars {
    color: #fbbf24;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    letter-spacing: 4px;
}

.guarantee-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}

.btn-review {
    background: white;
    color: #1a1a2e;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 0.5rem;
    text-transform: uppercase;
}

.btn-review:hover {
    background: #2319de;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(35, 25, 222, 0.4);
}

/* ===== CHECKOUT MODAL STYLES ===== */
.checkout-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkout-modal-overlay[style*="flex"] {
    display: flex;
}

.checkout-modal {
    background: white;
    border-radius: 1rem;
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.checkout-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.checkout-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
}

.checkout-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    border: none;
    background: white;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
}

.checkout-modal-close:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.checkout-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.checkout-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: #fafafa;
}

/* Checkout Sections */
.checkout-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.checkout-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.checkout-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 1rem 0;
}

/* Quick Checkout Product */
.quick-checkout-product {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.625rem;
    align-items: center;
}

.quick-checkout-product img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.quick-checkout-product-details {
    flex: 1;
    min-width: 0;
}

.quick-checkout-product-name {
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.quick-checkout-variants {
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.quick-checkout-product-qty {
    font-size: 0.8125rem;
    color: #94a3b8;
}

.quick-checkout-product-price {
    font-weight: 800;
    font-size: 1.125rem;
    color: #2319de;
}

/* Address Selector */
.address-selector {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.address-option {
    display: block;
    cursor: pointer;
}

.address-option input[type="radio"] {
    display: none;
}

.address-card {
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    background: white;
    transition: all 0.2s;
}

.address-option:hover .address-card {
    border-color: #cbd5e1;
}

.address-option.selected .address-card,
.address-option input[type="radio"]:checked ~ .address-card {
    border-color: #2319de;
    background: #f0f4ff;
}

.default-badge {
    display: inline-flex;
    padding: 0.25rem 0.625rem;
    background: #2319de;
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
}

.address-details {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.5;
}

.address-details strong {
    color: #1a1a2e;
    font-weight: 600;
}

/* Buttons in Modal */
.btn-add-address {
    width: 100%;
    padding: 0.875rem;
    background: white;
    border: 2px dashed #d1d5db;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add-address:hover {
    border-color: #2319de;
    color: #2319de;
    background: #f0f4ff;
}

.new-address-form {
    margin-top: 1rem;
    padding: 1.25rem;
    background: #f9fafb;
    border-radius: 0.625rem;
    border: 1px solid #e5e7eb;
}

.new-address-form h4 {
    margin: 0 0 1rem 0;
    color: #1a1a2e;
    font-size: 0.9375rem;
    font-weight: 700;
}

/* Form Groups */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    color: #1a1a2e;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2319de;
    box-shadow: 0 0 0 3px rgba(35, 25, 222, 0.1);
}

.form-group input[readonly] {
    background: #f3f4f6;
    cursor: not-allowed;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-top: 1rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2319de;
}

.checkbox-label span {
    font-size: 0.875rem;
    color: #475569;
}

/* Payment Methods */


.payment-method {
    padding: 0.875rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
}

.payment-method:hover {
    border-color: #cbd5e1;
}

.payment-method input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #2319de;
}

.payment-method input[type="radio"]:checked + span {
    font-weight: 600;
    color: #1a1a2e;
}

/* Summary */
.checkout-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9375rem;
    color: #475569;
}

.checkout-summary .summary-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0 0 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a2e;
    border-top: 2px solid #1a1a2e;
    margin-top: 0.5rem;
}

.checkout-summary .summary-total span:last-child {
    color: #2319de;
}

.summary-note {
    padding: 0.75rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    margin-top: 0.75rem;
}

/* Modal Buttons */
.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #2319de 0%, #1a1a2e 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(35, 25, 222, 0.3);
}

.btn-secondary {
    background: #f3f4f6;
    color: #475569;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* Success Modal */
.success-modal {
    text-align: center;
    padding: 2.5rem;
}

.success-icon {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 1.25rem;
}

.success-modal h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.success-modal p {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.order-details {
    background: #f9fafb;
    padding: 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.order-details p {
    margin: 0.5rem 0;
    color: #475569;
    font-size: 0.9375rem;
}

.success-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.success-actions a {
    text-decoration: none;
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 46, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    backdrop-filter: blur(4px);
}

.loading-spinner {
    background: white;
    padding: 2.5rem 3rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.loading-spinner .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #2319de;
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    animation: spin 0.8s linear infinite;
}

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

.loading-spinner p {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1023px) {
    .product-detail {
        padding: 1.5rem;
    }
    
    .main-image {
        max-height: 450px;
    }
}

@media (max-width: 767px) {
    .product-title {
        font-size: 1.5rem;
    }
    
    .current-price {
        font-size: 1.75rem;
    }
    
    .original-price {
        font-size: 1.125rem;
    }
    
    .main-image {
        max-height: 350px;
        padding: 1.5rem;
    }
    
    .thumbnail {
        width: 65px;
        height: 65px;
        min-width: 65px;
    }
    
    .guarantee-section {
        padding: 3rem 1.5rem;
    }
    
    .guarantee-title {
        font-size: 3.5rem;
    }
    
    .checkout-modal {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .checkout-modal-footer {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .success-actions a {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .product-features {
        padding: 1rem;
    }
    
    .product-features li {
        font-size: 0.875rem;
    }
    
    .variant-option {
        min-width: 45px;
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    .color-swatch {
        width: 36px;
        height: 36px;
    }
    
    .quantity-controls button {
        padding: 0.625rem 0.875rem;
    }
    
    .quantity-controls input {
        width: 50px;
    }
}