/* Import Google Fonts - Same as React site */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* React-style Subscription Page Styles */
.subscribe-page-wrapper {
    min-height: 100vh;
    background: #f5f5f0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@media (min-width: 768px) {
    .subscribe-page-wrapper {
        min-height: 85vh;
    }
}

.subscribe-main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px;
}

.subscribe-header {
    text-align: center;
    margin-bottom: 48px;
}

.subscribe-header h1,
.subscribe-page-wrapper .subscribe-header h1 {
    font-size: 3rem;
    font-size: clamp(2.5rem, 5vw, 3.75rem) !important;
    color: #002642;
    margin-bottom: 16px;
    font-family: 'Playfair Display', serif;
    font-weight: 100;
}

.subscribe-header p {
    font-size: 1.125rem;
    color: #666;
    margin-bottom: 8px;
    padding-bottom: 0;
}

.subscribe-step {
    margin-bottom: 48px;
    background: transparent;
}

/* Remove default section padding for subscribe page */
.subscribe-page-wrapper section {
    padding: 0;
}

.subscribe-step-title,
.subscribe-page-wrapper h2.subscribe-step-title,
.subscribe-page-wrapper .subscribe-step-title {
    font-size: 1.125rem !important;
    color: #C5A059;
    margin-bottom: 24px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.subscribe-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 767px) {
    /* Step 2 and Step 3: Stack vertically on mobile */
    .subscribe-options-grid.subscribe-options-grid-2 {
        grid-template-columns: 1fr;
    }
}

.subscribe-option-card {
    padding: 24px;
    border-radius: 8px;
    border: 2px solid white;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .subscribe-options-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .subscribe-options-grid.subscribe-options-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .subscribe-option-card {
        flex-direction: column;
    }
    
    /* Step 2: Ensure centered alignment on desktop */
    .subscribe-period-card {
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 767px) {
    /* Step 1: Flex layout with icon on left, text/price on right */
    .subscribe-edition-card {
        display: flex;
        flex-direction: row;
        text-align: left;
        align-items: center;
    }
    
    .subscribe-edition-card .subscribe-option-icon {
        margin-bottom: 0;
        margin-right: 16px;
        flex-shrink: 0;
    }
    
    .subscribe-edition-card .subscribe-option-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .subscribe-edition-card .subscribe-option-title {
        text-align: left;
        margin-bottom: 4px;
    }
    
    .subscribe-edition-card .subscribe-option-price {
        text-align: left;
        margin-top: 0;
    }
    
    /* Step 2 and Step 3: Center content and display block on mobile */
    .subscribe-period-card,
    .subscribe-location-card {
        display: block;
        flex-direction: column;
        text-align: center;
        align-items: center;
        justify-content: center;
    }
    
    .subscribe-period-card .subscribe-option-content,
    .subscribe-location-card .subscribe-option-content {
        display: block;
        width: 100%;
    }
    
    .subscribe-period-card .subscribe-option-title,
    .subscribe-location-card .subscribe-option-title {
        display: block;
        text-align: center;
    }
    
    /* Center badge in step 2 on mobile */
    .subscribe-period-card .subscribe-badge {
        text-align: center;
        margin: 0 auto 12px auto;
    }
}

/* Step 2: Center all content including monthly option on all screens */
.subscribe-period-card {
    align-items: center;
    justify-content: center;
}

.subscribe-period-card .subscribe-option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.subscribe-option-card:hover {
    border-color: #C5A059;
}

.subscribe-option-card.active {
    border-color: #002642;
    background: #002642;
    color: white;
}

.subscribe-option-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .subscribe-option-icon {
        margin-bottom: 0;
        margin-right: 16px;
    }
}

.subscribe-option-card.active .subscribe-option-icon {
    color: white;
}

.subscribe-option-icon svg {
    width: 100%;
    height: 100%;
}

.subscribe-option-content {
    flex: 1;
}

.subscribe-option-title,
.subscribe-page-wrapper .subscribe-option-title,
.subscribe-page-wrapper h3.subscribe-option-title {
    font-size: 1.25rem !important;
    font-family: 'Playfair Display', serif;
    margin-bottom: 0;
    color: #002642;
    font-weight: 500;
}

.subscribe-option-card.active .subscribe-option-title {
    color: white;
}

.subscribe-option-price {
    font-size: 0.875rem;
    margin-bottom: 0;
    margin-top: 12px;
    font-weight: 500;
    color: #666;
}

.subscribe-option-card.active .subscribe-option-price {
    color: rgba(255,255,255,0.8);
}

.subscribe-separator {
    border-top: 1px solid #e5e5e5;
    margin-bottom: 48px;
}

.subscribe-badge {
    background: linear-gradient(to right, #d4af37, #C5A059, #b8944d);
    color: white;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.875rem;
    margin-bottom: 12px;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.subscribe-details-form {
    background: white;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Style BMFormHandler forms to match subscribe page design */
.subscribe-details-form.form-handler {
    background: white;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.subscribe-details-form.form-handler .subscribe-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .subscribe-details-form.form-handler .subscribe-form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.subscribe-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .subscribe-form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.subscribe-details-form.form-handler .input-wrapper {
    flex: 1;
    padding: 0;
    margin-bottom: 0;
}

.subscribe-form-field {
    margin-bottom: 0;
}

.subscribe-details-form.form-handler .subscribe-form-label,
.subscribe-form-label {
    display: block;
    color: #002642;
    margin-bottom: 8px;
    font-weight: 400;
}

.subscribe-details-form.form-handler .subscribe-form-input,
.subscribe-details-form.form-handler .subscribe-form-select,
.subscribe-form-input,
.subscribe-form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d1d1;
    border-radius: 9999px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
    height: auto;
    line-height: normal;
}

.subscribe-details-form.form-handler .subscribe-form-input:focus,
.subscribe-details-form.form-handler .subscribe-form-select:focus,
.subscribe-form-input:focus,
.subscribe-form-select:focus {
    outline: none;
    border-color: #C5A059;
}

.subscribe-details-form.form-handler .subscribe-form-select,
.subscribe-form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23002642' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
    cursor: pointer;
}

.subscribe-details-form.form-handler .subscribe-form-select:disabled,
.subscribe-form-select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.subscribe-details-form.form-handler .subscribe-submit-btn,
.subscribe-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(to right, #d4af37, #C5A059, #b8944d);
    color: white;
    border: none;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-family: 'Inter', sans-serif;
    margin-top: 32px;
}

.subscribe-details-form.form-handler .subscribe-submit-btn:hover,
.subscribe-submit-btn:hover {
    background: linear-gradient(to right, #e5c050, #d4b16e, #c9a55e);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.subscribe-details-form.form-handler .input-wrapper.subscribe-hidden,
.subscribe-hidden {
    display: none;
}

.subscribe-details-form.form-handler .input-error {
    color: red;
    font-size: 0.875rem;
    margin-top: 4px;
    display: none;
}

.subscribe-details-form.form-handler .input-error.active {
    display: block;
}

/* BlockUI Loading Overlay - Inline styles for immediate override */
.subscribe-page-wrapper .blockUI.blockOverlay,
.subscribe-page-wrapper div.blockUI.blockOverlay {
    background: rgba(0, 38, 66, 0.85) !important;
    background-image: none !important;
    background-color: rgba(0, 38, 66, 0.85) !important;
}

.subscribe-page-wrapper .blockUI.blockOverlay::after,
.subscribe-page-wrapper div.blockUI.blockOverlay::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 50px !important;
    height: 50px !important;
    margin: -25px 0 0 -25px !important;
    border: 4px solid rgba(197, 160, 89, 0.2) !important;
    border-top-color: #C5A059 !important;
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
    display: block !important;
    z-index: 10000 !important;
}

.subscribe-page-wrapper .blockUI.blockOverlay img,
.subscribe-page-wrapper .blockUI.blockOverlay .blockMsg,
.subscribe-page-wrapper .blockUI .blockMsg {
    display: none !important;
    visibility: hidden !important;
}

/* Override any blue colors from plugins */
.subscribe-page-wrapper .blockUI.blockOverlay *,
.subscribe-page-wrapper .blockUI.blockOverlay::before {
    border-color: rgba(197, 160, 89, 0.2) !important;
    border-top-color: #C5A059 !important;
    border-left-color: #C5A059 !important;
    background: transparent !important;
    background-image: none !important;
    color: #C5A059 !important;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Free Trial Link Styling */
.subscribe-free-trial-link {
    text-align: center;
    margin-top: 8px;
    padding-top: 0;
}

.subscribe-free-trial-link a {
    color: #C5A059;
    text-decoration: none;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: color 0.2s;
    display: inline-block;
    cursor: pointer;
}

.subscribe-free-trial-link a:hover {
    color: #d4af37;
    text-decoration: none;
}

.subscribe-free-trial-link a .free-trial-text-1 {
    text-decoration: none;
}

.subscribe-free-trial-link a .free-trial-text-2 {
    text-decoration: underline;
}

.subscribe-free-trial-link a:hover .free-trial-text-2 {
    text-decoration: underline;
    color: #d4af37;
}

/* Responsive: Display on two lines and reduce font size on mobile */
@media (max-width: 768px) {
    .subscribe-free-trial-link a {
        font-size: 0.75rem; /* Decreased font size for mobile */
        display: block;
        line-height: 1.4;
    }
    
    .subscribe-free-trial-link a .free-trial-text-1 {
        display: block;
        margin-bottom: 2px;
    }
    
    .subscribe-free-trial-link a .free-trial-text-2 {
        display: block;
    }
}

/* Price Display */
.subscribe-price-display {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 48px;
    text-align: center;
}

.subscribe-price-content {
    font-size: 1.5rem;
    font-weight: 600;
    color: #002642;
    font-family: 'Playfair Display', serif;
}

.subscribe-price-content .price {
    display: block;
    margin-top: 8px;
}

.subscribe-price-content .woocommerce-Price-amount {
    font-size: 1.75rem;
    color: #002642;
}

/* Sale price styling - strikethrough regular, sale price, and discount badge */
.subscribe-price-content del.regular-price {
    text-decoration: line-through;
    opacity: 0.7;
    font-size: 1.5rem;
    margin-right: 8px;
}

.subscribe-price-content del.regular-price .woocommerce-Price-amount {
    font-size: 1.5rem;
    color: #666;
}

.subscribe-price-content ins.sale-price {
    text-decoration: none;
    font-weight: 600;
    margin-right: 12px;
}

.subscribe-price-content ins.sale-price .woocommerce-Price-amount {
    font-size: 1.75rem;
    color: #002642;
}

.subscribe-price-content .discount-badge {
    color: #002642;
    font-size: 1.25rem;
    font-weight: 500;
    font-family: 'Playfair Display', serif;
}

/* Hidden WooCommerce form for variation selection */
.subscribe-variation-form {
    display: none;
}

.subscribe-variation-form select {
    display: none;
}

/* ============================================
   Step 5: Checkout Section Styles
   ============================================ */

.subscribe-checkout-wrapper {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.subscribe-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #C5A059;
    text-align: center;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

/* Order Summary */
.subscribe-order-summary {
    background: white;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.order-summary-table {
    width: 100%;
    border-collapse: collapse;
}

.order-summary-table thead {
    border-bottom: 2px solid #e0e0e0;
}

.order-summary-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #002642;
    font-size: 0.875rem;
}

.order-summary-table th.col-qty,
.order-summary-table td.col-qty {
    text-align: center;
}

.order-summary-table th.col-total,
.order-summary-table td.col-total {
    text-align: right;
}

.order-summary-table th.col-remove,
.order-summary-table td.col-remove {
    text-align: center;
    width: 60px;
}

.order-summary-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.order-summary-table td {
    padding: 16px 8px;
    vertical-align: middle;
}

.cart-item-details {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-item-image {
    width: 80px;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

.cart-item-name {
    font-weight: 500;
    color: #002642;
    font-size: 0.95rem;
}

.cart-item-variation {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

.cart-qty-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cart-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #002642;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.cart-qty-btn:hover {
    background: #003d66;
}

.cart-qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 500;
}

.cart-remove-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.cart-remove-btn:hover {
    color: #d00;
}

.order-summary-totals {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #e0e0e0;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.95rem;
}

.order-summary-row.total-row {
    font-weight: 600;
    font-size: 1.1rem;
    color: #002642;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.order-summary-row .amount {
    font-weight: 600;
}

/* Payment Section */
.subscribe-payment-section {
    background: white;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.subscribe-checkout-form .wc_payment_methods {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.subscribe-checkout-form .wc_payment_method {
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
}

.subscribe-checkout-form .wc_payment_method:hover {
    border-color: #C5A059;
    box-shadow: 0 2px 8px rgba(197, 160, 89, 0.15);
}

.subscribe-checkout-form .wc_payment_method input[type="radio"]:checked ~ label,
.subscribe-checkout-form .wc_payment_method input[type="radio"]:checked + label {
    background: #f9f7f3;
    border-color: #C5A059;
}

.subscribe-checkout-form .wc_payment_method > label {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #002642;
    background: #fafafa;
    transition: all 0.2s ease;
    margin: 0;
    border-bottom: 1px solid #e0e0e0;
}

.subscribe-checkout-form .wc_payment_method > label:hover {
    background: #f5f5f5;
}

.subscribe-checkout-form .wc_payment_method input[type="radio"] {
    display: none;
    margin-right: 14px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #C5A059;
}

.subscribe-checkout-form .wc_payment_method input[type="radio"]:checked + label {
    color: #C5A059;
}

.subscribe-checkout-form .payment_box {
    padding: 24px 20px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}
 
.subscribe-checkout-form .payment_box p {
    margin: 0 0 16px 0;
    font-size: 0.9rem;
    color: #666;  
    
    line-height: 1.5;
}

.subscribe-checkout-form .payment_box fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

/* Add spacing after Credit Card heading/label */
.subscribe-checkout-form .wc_payment_method > label {
    margin-bottom: 16px;
}

/* Add spacing between form labels and inputs in payment section */
.subscribe-checkout-form .payment_box label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #002642;
    font-size: 0.9rem;
}

/* Add spacing after form rows in payment section */
.subscribe-checkout-form .payment_box .form-row {
    margin-bottom: 20px;
}

.subscribe-checkout-form .payment_box .form-row:last-child {
    margin-bottom: 0;
}

/* Payment form fields styling */
.subscribe-checkout-form .form-row {
    margin-bottom: 20px;
}

.subscribe-checkout-form .form-row:last-child {
    margin-bottom: 0;
}

.subscribe-checkout-form .form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #002642;
    font-size: 0.9rem;
}

.subscribe-checkout-form .form-row input,
.subscribe-checkout-form .form-row select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #fff;
    box-sizing: border-box;
}

.subscribe-checkout-form .form-row input:focus,
.subscribe-checkout-form .form-row select:focus {
    outline: none;
    border-color: #C5A059;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

.subscribe-checkout-form .form-row input::placeholder {
    color: #999;
}

/* Cardknox specific styling */
.subscribe-checkout-form .cardknox-card-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.subscribe-checkout-form .cardknox-card-group .form-row {
    margin-bottom: 0;
}

.subscribe-checkout-form .cardknox-card-number-container {
    grid-column: span 2;
}

.subscribe-checkout-form .cardknox-card-name-container {
    grid-column: span 2;
}

.subscribe-checkout-form .cardknox-card-expiry-container,
.subscribe-checkout-form .cardknox-card-cvc-container {
    grid-column: span 1;
}

@media (max-width: 600px) {
    .subscribe-checkout-form .cardknox-card-group {
        grid-template-columns: 1fr;
    }
    
    .subscribe-checkout-form .cardknox-card-number-container,
    .subscribe-checkout-form .cardknox-card-name-container {
        grid-column: span 1;
    }
}

/* iFrame styling for payment gateways - minimal container styling */
/* The actual input styling inside iframes is handled by cardknox.js setIfieldStyle() */
.subscribe-checkout-form iframe {
    width: 100% !important;
    min-height: 55px;
    border: none !important;
    padding: 0 !important;
}

/* Expiry input field styling - this is a regular input, not an iframe */
#cardknox-card-expiry {
    width: 100% !important;
    height: 48px !important;
    padding: 0.618047em !important;
    border: 1px solid #c3c3c3 !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    background-color: #fff !important;
    box-sizing: border-box !important;
    outline: none !important; 
    margin: 4px 0 15px;
}

#cardknox-card-expiry:focus {
    border-color: #C5A059 !important;
    box-shadow: 0 0 0 2px rgba(197, 160, 89, 0.15) !important;
}

/* Coupon Section */
.subscribe-coupon-section {
    margin-bottom: 24px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.subscribe-coupon-row {
    display: flex;
    gap: 12px;
}

.subscribe-coupon-row .subscribe-form-input {
    flex: 1;
}

.subscribe-apply-coupon-btn {
    padding: 12px 24px;
    background: #002642;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.subscribe-apply-coupon-btn:hover {
    background: #003d66;
}

/* Place Order Button */
.subscribe-place-order {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.subscribe-place-order-btn {
    width: 100%;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    background: #002642;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subscribe-place-order-btn:hover {
    background: #003d66;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 38, 66, 0.2);
}

.subscribe-place-order-btn:active {
    transform: translateY(0);
}

.subscribe-place-order-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading states */
.order-loading,
.payment-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* WooCommerce notices in checkout */
.subscribe-checkout-form .woocommerce-error,
.subscribe-checkout-form .woocommerce-message,
.subscribe-checkout-form .woocommerce-info {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 6px;
}

.subscribe-checkout-form .woocommerce-error {
    background: #fff2f2;
    border: 1px solid #d00;
    color: #d00;
}

.subscribe-checkout-form .woocommerce-message {
    background: #f0fff0;
    border: 1px solid #0a0;
    color: #0a0;
}

/* Empty cart message */
.order-summary-empty {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Responsive - keep vertical layout to match reference */
@media (min-width: 992px) {
    .subscribe-checkout-wrapper {
        max-width: 800px;
        margin: 0 auto;
    }
}

/* ============================================
   Mobile Order Summary - Card/Block Layout
   ============================================ */

.order-summary-table{
    border: none;
}
   
@media (max-width: 768px) {
    /* Order summary container adjustments */
    .subscribe-order-summary {
        padding: 20px 16px;
        overflow-x: hidden;
    }
    
    /* Hide table header on mobile */
    .order-summary-table thead {
        display: none;
    }
    
    /* Convert table to block display */
    .order-summary-table,
    .order-summary-table tbody,
    .order-summary-table tr,
    .order-summary-table td {
        display: block;
        width: 100%;
    }
    
    /* Each table row becomes a card */
    .order-summary-table tbody tr {
        background: #f9f9f7;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 16px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .order-summary-table tbody tr:last-child {
        margin-bottom: 0;
    }
    
    /* Reset cell padding for mobile cards */
    .order-summary-table td {
        padding: 0;
        border: none;
    }
    
    /* Product column - full width at top */
    .order-summary-table td.col-product {
        margin-bottom: 16px;
    }
    
    /* Cart item details - stack vertically */
    .cart-item-details {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }
    
    /* Larger product image on mobile */
    .cart-item-image {
        width: 100px;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }
    
    /* Product info centered */
    .cart-item-info {
        text-align: center;
    }
    
    .cart-item-name {
        font-size: 1rem;
        font-weight: 600;
        line-height: 1.4;
        margin-bottom: 8px;
    }
    
    .cart-item-variation {
        font-size: 0.85rem;
        color: #555;
    }
    
    /* Quantity, Total, Remove - horizontal row at bottom */
    .order-summary-table td.col-qty,
    .order-summary-table td.col-total,
    .order-summary-table td.col-remove {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        width: auto;
        vertical-align: middle;
    }
    
    /* Create a flex row for qty, total, remove */
    .order-summary-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
    }
    
    .order-summary-table td.col-product {
        width: 100%;
        flex: 0 0 100%;
    }
    
    .order-summary-table td.col-qty {
        flex: 1;
        justify-content: flex-start;
        padding-left: 8px;
    }
    
    .order-summary-table td.col-total {
        flex: 1;
        justify-content: center;
        font-weight: 600;
        color: #002642;
        font-size: 1rem;
    }
    
    .order-summary-table td.col-remove {
        flex: 0 0 auto;
        justify-content: flex-end;
        padding-right: 8px;
    }
    
    /* Quantity controls styling for mobile */
    .cart-qty-wrapper {
        gap: 6px;
    }
    
    .cart-qty-btn {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .cart-qty-value {
        min-width: 20px;
        font-size: 0.95rem;
    }
    
    /* Remove button styling */
    .cart-remove-btn {
        font-size: 1.25rem;
        padding: 6px;
    }
    
    /* Order summary totals section */
    .order-summary-totals {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .order-summary-row {
        font-size: 0.9rem;
        padding: 10px 0;
    }
    
    .order-summary-row.total-row {
        font-size: 1.05rem;
    }
}

/* Extra small screens - further adjustments */
@media (max-width: 480px) {
    .subscribe-order-summary {
        padding: 16px 12px;
    }
    
    .order-summary-table tbody tr {
        padding: 14px 12px;
    }
    
    /* Larger image on very small screens for better visibility */
    .cart-item-image {
        width: 90px;
    }
    
    .cart-item-name {
        font-size: 0.95rem;
    }
    
    /* Stack qty/total/remove more compactly */
    .order-summary-table td.col-qty,
    .order-summary-table td.col-total,
    .order-summary-table td.col-remove {
        padding: 4px;
    }
    
    .cart-qty-btn {
        width: 26px;
        height: 26px;
    }
}



/*  error messages */
.woocommerce-error::before, .woocommerce-info::before, .woocommerce-message::before {
  font-family: WooCommerce;
  content: "\e016"; 
  display: inline-block;
  position: static !important;
}

/* Override place order button to match subscribe-submit-btn styling */
.subscribe-page-wrapper #place_order,
.subscribe-page-wrapper .subscribe-place-order-btn,
.subscribe-checkout-form #place_order,
.subscribe-checkout-form .subscribe-place-order-btn {
    width: 100% !important;
    padding: 16px !important;
    background: linear-gradient(to right, #d4af37, #C5A059, #b8944d) !important;
    color: white !important;
    border: none !important;
    border-radius: 9999px !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
    font-family: 'Inter', sans-serif !important;
    margin-top: 32px !important;
}

.subscribe-page-wrapper #place_order:hover,
.subscribe-page-wrapper .subscribe-place-order-btn:hover,
.subscribe-checkout-form #place_order:hover,
.subscribe-checkout-form .subscribe-place-order-btn:hover {
    background: linear-gradient(to right, #e5c050, #d4b16e, #c9a55e) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 8px rgba(0,0,0,0.15) !important;
}