* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #F9F6F0;
    color: #2C3E50;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo-container {
    margin-bottom: 1rem;
}

/* Logo Styling */
.logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-image {
    max-width: 250px; /* Increased by 25% from 200px */
    max-height: 100px; /* Increased by 25% from 80px */
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto; /* Ensures centering */
}

.product-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
}

.product-section h2 {
    color: #2C3E50;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.product-section > p {
    color: #2C3E50;
    text-align: center;
    margin-bottom: 2rem;
}

.coffee-description {
    line-height: 1.4;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    word-break: keep-all;
    white-space: normal;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 768px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-image {
        text-align: center;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    .photo-swipe-container {
        max-width: 280px;
        height: 280px;
        aspect-ratio: 1;
        width: 280px;
        margin: 0 auto;
        display: block;
    }
    
    .photo-swipe-container .coffee-jar {
        width: 280px;
        height: 280px;
        object-fit: cover;
        object-position: center;
    }
    
    .size-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 400px;
        margin: 0 auto 2rem auto;
    }
    
    .grind-select-container {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .checkout-section {
        text-align: center;
    }
}

.product-image {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.photo-swipe-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 300px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.photo-swipe-container .coffee-jar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    border-radius: 8px;
}

.photo-swipe-container .coffee-jar.active {
    opacity: 1;
}

.photo-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator.active {
    background: #007BA7;
}

.coffee-jar {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 1;
    visibility: visible;
    transform-origin: bottom;
}

.coffee-jar {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 1;
    visibility: visible;
}

.coffee-jar:hover {
    transform: scale(1.02);
}

.size-selector h3 {
    color: #2C3E50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .size-selector h3 {
        margin-bottom: 0.5rem;
        font-size: 1rem;
    }
}

.size-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
    width: 100%;
}

.size-option {
    display: block;
    cursor: pointer;
    text-align: center;
    padding: 1.25rem 1rem;
    background: #F9F6F0;
    border: 2px solid #007BA7;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 123, 167, 0.1);
}

.size-option:hover {
    border-color: #007BA7;
    background: #F9F6F0;
}

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

.size-option input[type="radio"]:checked + .size-option {
    border-color: #007BA7;
    background: #007BA7;
    color: white;
}

.size-option input[type="radio"]:checked ~ .size-option {
    border-color: #007BA7;
    background: #007BA7;
    color: white;
}

.size-option input[type="radio"]:checked + .size-option,
.size-option:has(input[type="radio"]:checked) {
    border-color: #007BA7;
    background: #007BA7;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 167, 0.3);
}

.size-option input[type="radio"]:checked ~ * {
    color: white;
}

.size-option .size {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.size-option .price {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

.checkout-section {
    border-top: 1px solid #D7B49E;
    padding-top: 2rem;
}

.total {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: #2C3E50;
}

.total strong {
    color: #007BA7;
    font-size: 1.4rem;
}

.checkout-btn {
    width: 100%;
    background: #E2856E;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkout-btn:hover {
    background: #007BA7;
    transform: translateY(-2px);
}

/* Checkout Modal Styles */
.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.checkout-modal.active .modal-content {
    transform: translateY(0);
}

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

.modal-header h3 {
    color: #2C3E50;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: #f8f9fa;
}

.modal-body {
    padding: 1.5rem;
}

.order-summary {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

.order-summary h4 {
    color: #2C3E50;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.order-summary p {
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    justify-content: space-between;
}

.order-summary .total {
    text-align: right;
    margin-bottom: 0;
    font-size: 1rem;
    border-top: 1px solid #e9ecef;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.order-summary .total strong {
    color: #007BA7;
    font-size: 1.1rem;
}

.checkout-form {
    margin-bottom: 1rem;
}

/* Form Layout */
.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2C3E50;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007BA7;
    box-shadow: 0 0 0 2px rgba(0, 123, 167, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

/* Card input styling */
.form-group input[id="card-number"] {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.form-group input[id="expiry"],
.form-group input[id="cvv"] {
    text-align: center;
}

/* Stripe Card Element Styling */
.stripe-element {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stripe-element.StripeElement--focus {
    border-color: #007BA7;
    box-shadow: 0 0 0 3px rgba(0, 123, 167, 0.1);
}

.stripe-element.StripeElement--invalid {
    border-color: #dc3545;
}

.stripe-element.StripeElement--complete {
    border-color: #28a745;
}

/* Cart Recovery Styles */
.cart-recovery {
    text-align: center;
    margin: 2rem 0;
}

.loading {
    color: #6c757d;
    font-style: italic;
}

.recovered-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.recovered-item h3 {
    color: #2C3E50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.recovered-item p {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
}

.error-message h3 {
    margin-bottom: 1rem;
    color: #dc3545;
}

.error-message a {
    display: inline-block;
    margin-top: 1rem;
    text-decoration: none;
}

/* Pay Button Styles */
.pay-btn {
    width: 100%;
    background: #007BA7;
    color: white;
    border: none;
    padding: 0.875rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.pay-btn:hover {
    background: #005a7a;
    transform: translateY(-1px);
}

.pay-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* Bean Selection */
.bean-selection {
    margin-bottom: 2rem;
}

.bean-selection h3 {
    color: #2C3E50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.grind-select-container {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.grind-select {
    width: 100%;
    padding: 1.25rem 1rem;
    border: 2px solid #007BA7;
    border-radius: 16px;
    font-size: 1rem;
    background: #F9F6F0;
    color: #2C3E50;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 3rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 123, 167, 0.1);
}

.grind-select:hover {
    border-color: #007BA7;
    box-shadow: 0 0 0 2px rgba(0, 123, 167, 0.1);
}

.grind-select:focus {
    outline: none;
    border-color: #007BA7;
    box-shadow: 0 0 0 3px rgba(0, 123, 167, 0.1);
}

.grind-select option {
    padding: 0.5rem;
    background: white;
    color: #2C3E50;
}

.grind-info {
    background: white;
    border: 2px solid #007BA7;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 123, 167, 0.1);
}

.grind-type {
    display: block;
    font-weight: 600;
    color: #007BA7;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.grind-desc {
    display: block;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}





@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .product-section {
        padding: 1.5rem;
    }
    
    .coffee-description {
        line-height: 1.3;
        font-size: 0.95rem;
        hyphens: auto;
        word-break: keep-all;
        orphans: 2;
        widows: 2;
    }
    
    .logo {
        width: 100%;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .logo-image {
        max-width: 200px;
        max-height: 80px;
        margin: 0 auto;
        display: block;
    }
    
    .size-option {
        padding: 0.875rem;
    }

    .size-option .size {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }

    .size-option .price {
        font-size: 0.9rem;
    }

    .grind-select {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
        max-width: none;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .logo {
        width: 100%;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .logo-image {
        max-width: 160px;
        max-height: 64px;
        margin: 0 auto;
        display: block;
    }
    
    .photo-swipe-container {
        max-width: 240px;
        height: 240px;
        width: 240px;
        margin: 0 auto;
        display: block;
    }
    
    .photo-swipe-container .coffee-jar {
        width: 240px;
        height: 240px;
    }
    
    .size-options {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .size-option {
        padding: 0.5rem;
        margin: 0;
    }

    .size-option .size {
        font-size: 0.85rem;
    }

    .size-option .price {
        font-size: 0.75rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 0.75rem;
    }
}


