
/* Checkout Page Styles */
body {
    margin-top: 70px;
    font-family: 'Cormorant Garamond', serif;
    background: #f9f5f0;
    color: #3a3a3a;
}

.blank-space {
    height: 70px;
    width: 100%;
    background-color: #d4af37;
}

main {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: 1rem auto;
    padding: 0 1rem;
    gap: 1.5rem;
}

/* Cart Section */
.cart-section {
    width: 100%;
    background: #fff;
    padding: 1.5rem;
    border: 1px solid #f0eae1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.cart-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.cart-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #3a3a3a;
    font-weight: 400;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.continue-shopping {
    font-family: 'Cormorant Garamond', serif;
    color: #7a6a5f;
    text-decoration: none;
    border-bottom: 1px solid #d4af37;
    padding-bottom: 3px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.cart-items {
    margin-bottom: 1.5rem;
}

.cart-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f0eae1;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid #f0eae1;
}

.cart-item-details {
    flex: 1;
    min-width: 120px;
}

.cart-item-name {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.cart-item-price {
    font-family: 'Rubik', sans-serif;
    color: #7a6a5f;
    font-size: 0.9rem;
}
.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
}

.cart-item-controls .minus,
.cart-item-controls .plus {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.cart-item-controls .number {
    min-width: 20px;
    text-align: center;
}

.cart-item-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto; /* Pushes it to the right */
    width: 30px;
    height: 30px;
}

.cart-item-remove i {
    font-size: 1.1rem;
}

.cart-item-controls button {
    width: 30px;
    height: 30px;
    background: transparent;
    border: 1px solid #e8e2d6;
    border-radius: 0;
    font-family: 'Rubik', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-item-remove i {
    color: #7a6a5f;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

/* Cart Summary */
.cart-summary {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.cart-summary label {
    font-family: 'Cormorant Garamond', serif;
    color: #7a6a5f;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.entercode {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #e8e2d6;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.apply-btn {
    width: 100%;
    padding: 0.7rem;
    background: transparent;
    color: #7a6a5f;
    border: 1px solid #e8e2d6;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Cart Totals */
.cart-totals {
    margin: 1.5rem 0;
}

.subtotal-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-family: 'Cormorant Garamond', serif;
    color: #3a3a3a;
    font-size: 0.9rem;
}

.subtotal-row span:last-child {
    font-family: 'Rubik', sans-serif;
}

.address-wrapper {
    position: relative;
    margin: 1rem 0;
}

.address {
    font-family: 'Cormorant Garamond', serif;
    color: #7a6a5f;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
}

.address-select-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #f0eae1;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

#townshipSearch {
    width: 100%;
    padding: 0.7rem;
    margin-bottom: 0.5rem;
    border: 1px solid #e8e2d6;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
}

#townshipList {
    list-style: none;
    max-height: 150px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

#townshipList li {
    padding: 0.5rem;
    cursor: pointer;
    font-family: 'Cormorant Garamond', serif;
    color: #7a6a5f;
    font-size: 0.9rem;
}

.hidden {
    display: none;
}

/* Delivery Options */
.delivery-options {
    margin: 1.5rem 0;
}

.delivery-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.delivery-option {
    display: flex;
    align-items: center;
}

.delivery-option input {
    margin-right: 0.5rem;
}

.delivery-option label {
    font-family: 'Cormorant Garamond', serif;
    color: #7a6a5f;
    font-size: 0.9rem;
}

/* Schedule Date Container */
.schedule-date-container {
    margin: 1rem 0;
    padding: 1rem;
    background: #f9f5f0;
    border: 1px solid #e8e2d6;
}

.date-selection {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.date-selection label {
    font-family: 'Cormorant Garamond', serif;
    color: #7a6a5f;
    font-size: 0.9rem;
}

#scheduled-date {
    padding: 0.5rem;
    border: 1px solid #e8e2d6;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
}

.selected-date-display {
    font-family: 'Cormorant Garamond', serif;
    color: #7a6a5f;
    font-style: italic;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Cart Notes */
.cart-notes {
    margin: 1.5rem 0;
}

.cart-notes label {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    color: #7a6a5f;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.cart-notes textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.8rem;
    border: 1px solid #e8e2d6;
    font-family: 'Cormorant Garamond', serif;
    margin-bottom: 1rem;
    resize: vertical;
    font-size: 0.9rem;
}

/* Contact Section */
.contact-section {
    width: 100%;
    background: #fff;
    padding: 1.5rem;
    border: 1px solid #f0eae1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.contact-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #3a3a3a;
    font-weight: 400;
    margin-bottom: 1rem;
}

.contact-form label {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    color: #7a6a5f;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.contact-form input {
    width: 100%;
    padding: 0.7rem;
    margin-bottom: 1rem;
    border: 1px solid #e8e2d6;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
}

.required {
    color: #d4af37;
}

.checkout-btn {
    width: 100%;
    padding: 0.8rem;
    background: transparent;
    color: #7a6a5f;
    border: 1px solid #e8e2d6;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    body {
        margin-top: 100px;
    }
    
    main {
        flex-direction: row;
        max-width: 1200px;
        margin: 2rem auto;
        padding: 0 2rem;
        gap: 2rem;
    }
    
    .cart-section {
        width: 60%;
        padding: 2rem;
    }
    
    .contact-section {
        width: 40%;
        padding: 2rem;
    }
    
    .cart-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .cart-item {
        flex-wrap: nowrap;
    }
    
    .cart-item-controls {
        width: auto;
        margin-top: 0;
    }
    
    .cart-summary {
        flex-direction: row;
        align-items: center;
    }
    
    .cart-summary label {
        margin-right: 1rem;
        margin-bottom: 0;
    }
    
    .entercode {
        width: auto;
        flex: 1;
        margin-right: 1rem;
        margin-bottom: 0;
    }
    
    .apply-btn {
        width: auto;
    }
    
    .delivery-inputs {
        flex-direction: row;
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    main {
        gap: 3rem;
    }
    
    .cart-section, .contact-section {
        padding: 2.5rem;
    }
    
    .cart-header h2, .contact-section h3 {
        font-size: 1.8rem;
    }
    
    .cart-item-img {
        width: 80px;
        height: 80px;
    }
    
    .cart-item-name {
        font-size: 1.1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Touch target sizes */
button, .address, .cart-item-remove {
    min-height: 44px;
    min-width: 44px;
}
