/* ======================================
   REFURBISHED IPHONE SHOP STYLES
   Inspired by Ferdifixt.nl
   ====================================== */

/* Product Grid Container */
.iphone-shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin: 40px auto;
    padding: 20px;
    max-width: 900px;
}

/* Center single product */
.iphone-shop-grid.single-product {
    grid-template-columns: 1fr;
    max-width: 450px;
}

/* Product Card */
.iphone-product-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
}

.iphone-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
    border-color: #007bff;
}

.iphone-product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Product Image Container */
.iphone-product-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: #f8f9fa;
    overflow: hidden;
}

.iphone-product-image img.iphone-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.iphone-product-card:hover .iphone-img {
    transform: scale(1.05);
}

.iphone-no-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 14px;
}

/* Condition Badge */
.iphone-condition-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #007bff;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* Product Info */
.iphone-product-info {
    padding: 18px;
}

.iphone-product-title {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.iphone-product-price {
    font-size: 22px;
    font-weight: 700;
    color: #007bff;
    margin: 0;
}

/* No Products Message */
.iphone-no-products {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 40px auto;
    max-width: 600px;
}

/* ======================================
   SINGLE PRODUCT PAGE STYLES
   ====================================== */

.iphone-single-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.iphone-single-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 30px 0;
    line-height: 1.2;
    text-align: center;
}

.iphone-single-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    padding: 40px;
}

.iphone-single-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.iphone-single-image-wrapper {
    width: 100%;
}

.iphone-single-image-container {
    width: 100%;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iphone-single-image-container img {
    max-width: 100%;
    max-height: 500px;
    height: auto;
    width: auto;
    border-radius: 8px;
    object-fit: contain;
}

/* Slideshow Styles */
.iphone-slideshow-container {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
}

.iphone-slide {
    display: none;
    padding: 30px;
    text-align: center;
}

.iphone-slide.active {
    display: block;
}

.iphone-slide img {
    max-width: 100%;
    max-height: 500px;
    height: auto;
    width: auto;
    border-radius: 8px;
    object-fit: contain;
    margin: 0 auto;
}

.iphone-slide-prev,
.iphone-slide-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 4px;
    transition: all 0.3s ease;
    z-index: 10;
}

.iphone-slide-prev:hover,
.iphone-slide-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.iphone-slide-prev {
    left: 15px;
}

.iphone-slide-next {
    right: 15px;
}

.iphone-slide-dots {
    text-align: center;
    padding: 15px 0;
    background: #f8f9fa;
}

.iphone-dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.iphone-dot.active,
.iphone-dot:hover {
    background-color: #007bff;
}

.iphone-single-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.iphone-detail-section {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.iphone-detail-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.iphone-detail-value {
    font-size: 28px;
    font-weight: 700;
    color: #007bff;
    margin: 0;
}

.iphone-detail-value.condition {
    color: #1a1a1a;
    font-size: 20px;
}

.iphone-condition-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 10px 0 0 0;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

/* Terms and Conditions Section */
.iphone-terms-section {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.iphone-terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.iphone-terms-checkbox input[type="checkbox"] {
    margin-top: 3px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.iphone-terms-checkbox span {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.iphone-terms-checkbox a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.iphone-terms-checkbox a:hover {
    text-decoration: underline;
}

/* Buy Button */
.iphone-buy-button {
    display: block;
    background: #007bff;
    color: white;
    padding: 18px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.iphone-buy-button:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.35);
    color: white;
}

.iphone-buy-button.disabled {
    background: #ccc;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

.iphone-buy-button.disabled:hover {
    background: #ccc;
    transform: none;
}

.iphone-single-description {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e8e8e8;
    grid-column: 1 / -1;
}

.iphone-single-description p {
    margin-bottom: 15px;
}

.iphone-single-description h2,
.iphone-single-description h3 {
    color: #1a1a1a;
    margin-top: 25px;
    margin-bottom: 15px;
}

.iphone-single-description ul,
.iphone-single-description ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

/* ======================================
   RESPONSIVE DESIGN - MOBILE
   ====================================== */

@media (max-width: 768px) {
    /* Product grid - 1 column on mobile */
    .iphone-shop-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px auto;
        padding: 15px;
    }
    
    .iphone-shop-grid.single-product {
        max-width: 100%;
    }
    
    .iphone-product-title {
        font-size: 16px;
    }
    
    .iphone-product-price {
        font-size: 20px;
    }
    
    .iphone-single-container {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .iphone-single-title {
        font-size: 26px;
        margin-bottom: 20px;
    }
    
    .iphone-single-content {
        padding: 25px 20px;
    }
    
    .iphone-single-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .iphone-single-image-container {
        padding: 20px;
    }
    
    .iphone-single-image-container img {
        max-height: 350px;
    }
    
    .iphone-slide {
        padding: 20px;
    }
    
    .iphone-slide img {
        max-height: 350px;
    }
    
    .iphone-slide-prev,
    .iphone-slide-next {
        padding: 10px 15px;
        font-size: 20px;
    }
    
    .iphone-slide-prev {
        left: 10px;
    }
    
    .iphone-slide-next {
        right: 10px;
    }
    
    .iphone-buy-button {
        width: 100%;
        padding: 16px 30px;
    }
    
    .iphone-detail-value {
        font-size: 24px;
    }
    
    .iphone-single-description {
        margin-top: 20px;
        padding-top: 20px;
    }
}

@media (max-width: 480px) {
    .iphone-product-info {
        padding: 15px;
    }
    
    .iphone-condition-badge {
        font-size: 10px;
        padding: 4px 10px;
    }
    
    .iphone-single-title {
        font-size: 22px;
    }
    
    .iphone-detail-section {
        padding: 15px;
    }
    
    .iphone-slide-prev,
    .iphone-slide-next {
        padding: 8px 12px;
        font-size: 18px;
    }
}