/* Purchase Page CSS - Default Skin */

/* Base styles matching homepage */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fefefe;
    color: #2d2d2d;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header section */
.header {
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.back-link {
    display: inline-block;
    color: #ff6b9d;
    text-decoration: none;
    margin-bottom: 30px;
    font-size: 1.1rem;
    border: 2px solid #ff6b9d;
    padding: 12px 24px;
    border-radius: 25px;
    transition: all 0.3s;
    font-weight: 600;
}

.back-link:hover {
    background: #ff6b9d;
    color: #000;
    transform: translateY(-2px);
}

.main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    background: linear-gradient(135deg, #ff6b9d 0%, #4ecdc4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.3rem;
    color: #6c757d;
    margin-bottom: 30px;
    font-weight: 400;
}

/* Main content grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

/* Product info section */
.product-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.product-image {
    width: 200px;
    height: 300px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border: 1px solid #e9ecef;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.book-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ff6b9d;
    margin-bottom: 15px;
    text-align: center;
}

.book-description {
    font-size: 1.2rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 30px;
}

.features-list {
    list-style: none;
    margin-bottom: 30px;
}

.features-list li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #2d2d2d;
}

.features-list li:before {
    content: "✨";
    margin-right: 15px;
    font-size: 1.2rem;
}

/* Purchase form section */
.purchase-section {
    background: linear-gradient(135deg, #f8fff8 0%, #e8f5e8 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.1);
    border: 2px solid #4CAF50;
    position: sticky;
    top: 20px;
}

.price-display {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.original-price {
    font-size: 1.2rem;
    color: #888;
    text-decoration: line-through;
    display: block;
    margin-bottom: 5px;
}

.current-price {
    font-size: 3rem;
    font-weight: 900;
    color: #4CAF50;
    display: block;
    margin-bottom: 10px;
}

.savings-badge {
    background: #ff6b6b;
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-block;
}

/* Account integration */
.account-section {
    background: rgba(255, 107, 157, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 107, 157, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b9d 0%, #4ecdc4 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    font-weight: 700;
}

.user-details h3 {
    color: #ff6b9d;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.user-details p {
    color: #cccccc;
    font-size: 0.9rem;
}

/* Form styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #4CAF50;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 15px;
    background: #ffffff;
    border: 2px solid rgba(76, 175, 80, 0.3);
    border-radius: 10px;
    color: #2d2d2d;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.2);
    background: rgba(76, 175, 80, 0.05);
}

/* Discount section */
.discount-section {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #000;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.discount-section h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.discount-amount {
    font-size: 2rem;
    font-weight: 900;
    color: #d32f2f;
}

/* Purchase button */
.purchase-btn {
    width: 100%;
    background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
    color: #000;
    padding: 20px;
    font-size: 1.3rem;
    font-weight: 900;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
}

.purchase-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(76, 175, 80, 0.4);
}

.purchase-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    opacity: 0.7;
}

/* Auth options */
.auth-options {
    text-align: center;
    margin-bottom: 20px;
}

.auth-link {
    color: #ff6b9d;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border: 1px solid #ff6b9d;
    border-radius: 20px;
    display: inline-block;
    margin: 0 10px;
    transition: all 0.3s;
}

.auth-link:hover {
    background: #ff6b9d;
    color: #000;
}

/* Security info */
.security-info {
    background: rgba(76, 175, 80, 0.05);
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid #4CAF50;
    margin-top: 20px;
    border: 1px solid rgba(76, 175, 80, 0.1);
}

.security-info h4 {
    color: #4CAF50;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.security-info p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Mobile-First Responsive Design */
/* Base styles are mobile-first (320px+) */

/* Small mobile optimizations (320px-480px) */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .main-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .product-section,
    .purchase-section {
        padding: 20px;
        border-radius: 15px;
    }
    
    .product-image {
        width: 150px;
        height: 200px;
        font-size: 2rem;
    }
    
    .book-title {
        font-size: 1.5rem;
    }
    
    .book-description {
        font-size: 1rem;
    }
    
    .features-list li {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    /* Mobile-optimized touch targets */
    .back-link {
        padding: 15px 25px;
        font-size: 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .purchase-btn {
        padding: 18px;
        font-size: 1.2rem;
        min-height: 56px;
        margin-bottom: 15px;
    }
    
    .auth-link {
        padding: 12px 20px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        margin: 5px;
    }
    
    /* Mobile form optimizations */
    .form-group input,
    .form-group select {
        padding: 18px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
        height: 44px;
    }
    
    .form-group label {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    /* Mobile expiry grid adjustment */
    @media (max-width: 480px) {
        .container .product-section div[style*="grid-template-columns: 1fr 1fr 120px"] {
            grid-template-columns: 1fr 1fr 1fr !important;
            gap: 10px !important;
        }
    }
    
    /* Mobile-first discount section */
    .discount-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .discount-section h3 {
        font-size: 1.2rem;
    }
    
    .discount-amount {
        font-size: 1.5rem;
    }
    
    /* Mobile price display */
    .price-display {
        padding: 20px 15px;
    }
    
    .current-price {
        font-size: 2.5rem;
    }
    
    .original-price {
        font-size: 1.1rem;
    }
    
    /* Mobile security info */
    .security-info {
        padding: 15px;
    }
    
    .security-info h4 {
        font-size: 1rem;
    }
    
    .security-info p {
        font-size: 0.85rem;
    }
}

/* Large mobile/small tablet (481px-768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .purchase-section {
        position: static;
        order: -1; /* Move purchase section to top on mobile */
    }
    
    .product-section {
        order: 1;
    }
    
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .product-section,
    .purchase-section {
        padding: 30px;
    }
}

/* Tablet optimizations (769px-1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr 350px;
        gap: 30px;
    }
    
    .container {
        padding: 20px;
    }
}

/* Desktop optimizations (1025px+) */
@media (min-width: 1025px) {
    .content-grid {
        grid-template-columns: 1fr 400px;
        gap: 40px;
    }
    
    .purchase-section {
        position: sticky;
        top: 20px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .purchase-btn:hover {
        transform: none;
    }
    
    .back-link:hover,
    .auth-link:hover {
        transform: none;
    }
    
    /* Larger touch targets for mobile */
    .purchase-btn {
        min-height: 56px;
    }
    
    .back-link,
    .auth-link {
        min-height: 44px;
    }
}