/* iPhone Price Modal Styles */
:root {
    --iphone-btn-gradient-start: #FF3333;
    --iphone-btn-gradient-end: #FF6666;
    --iphone-modal-bg: rgba(255, 255, 255, 0.9);
    --iphone-modal-backdrop: 10px;
    --iphone-text-color: #333;
    --iphone-price-color: #d0021b;
    --iphone-border-radius: 16px;
}

/* Floating Button */
.iphone-price-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    background: linear-gradient(135deg, var(--iphone-btn-gradient-start), var(--iphone-btn-gradient-end));
    color: white;
    padding: 10px 18px;
    border-radius: 40px; /* Pill shape */
    box-shadow: 0 6px 14px rgba(255, 51, 51, 0.28);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    border: none;
    outline: none;
    text-decoration: none;
    animation: none;
}

.iphone-price-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(255, 51, 51, 0.45);
}

.iphone-price-btn i {
    font-size: 18px;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 51, 51, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 51, 51, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 51, 51, 0); }
}

/* Modal Overlay */
.iphone-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.iphone-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content */
.iphone-modal {
    background: var(--iphone-modal-bg);
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: blur(var(--iphone-modal-backdrop));
    -webkit-backdrop-filter: blur(var(--iphone-modal-backdrop));
    border: 1px solid rgba(255, 255, 255, 0.5);
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.iphone-modal-overlay.active .iphone-modal {
    transform: scale(1);
}

/* Modal Header */
.iphone-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.8);
    border-radius: 24px 24px 0 0;
}

.iphone-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.iphone-modal-title i {
    color: var(--iphone-btn-gradient-start);
}

.iphone-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.iphone-modal-close:hover {
    color: #FF3333;
    background: rgba(255, 51, 51, 0.1);
}

/* Modal Body */
.iphone-modal-body {
    padding: 25px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.iphone-modal-body::-webkit-scrollbar {
    width: 6px;
}

.iphone-modal-body::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
}

/* Series Card */
.iphone-series-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
}

.iphone-series-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.iphone-series-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 18px;
    background: linear-gradient(to bottom, #FF3333, #FF6666);
    border-radius: 2px;
}

/* Price Item with Dot Leaders */
.iphone-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
}

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

.iphone-name {
    font-weight: 500;
    color: #444;
    white-space: nowrap;
    padding-right: 5px;
}

.iphone-dots {
    flex-grow: 1;
    border-bottom: 2px dotted #ddd;
    margin: 0 5px;
    position: relative;
    top: -4px;
}

.iphone-price {
    font-weight: 700;
    color: var(--iphone-price-color);
    white-space: nowrap;
    padding-left: 5px;
    min-width: 80px;
    text-align: right;
}

/* Warranty Section */
.iphone-warranty {
    margin-top: 20px;
    background: #f9fff9;
    border: 1px solid #e0f0e0;
    border-radius: 12px;
    padding: 15px;
}

.warranty-title {
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.warranty-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
}

.warranty-list li i {
    color: #27ae60;
    font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .iphone-price-btn {
        bottom: 20px;
        left: 20px;
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .iphone-modal {
        width: 95%;
        max-height: 80vh;
    }
    
    .iphone-price-item {
        font-size: 14px;
    }
}

/* Dim iPhone Price button when auth modal is open */
body.auth-open .iphone-price-btn {
    filter: grayscale(100%) blur(0.6px);
    opacity: 0.45;
    pointer-events: none;
    box-shadow: 0 0 0 rgba(0,0,0,0.0);
    transition: opacity 0.25s ease, filter 0.25s ease;
}
