/* Fitamin Address Step Styles */

/* Product Suggestions Links */
.fas-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.fas-product-title a:hover {
    color: #0073aa;
    text-decoration: none;
}

.fas-product-category a {
    color: #666;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.fas-product-category a:hover {
    color: #0073aa;
    text-decoration: underline;
}

.fas-product-image a {
    display: block;
    transition: opacity 0.3s ease;
}

.fas-product-image a:hover {
    opacity: 0.8;
}

/* Checkout Steps Progress */
.fas-checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.fas-step-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.fas-step-link:hover {
    text-decoration: none;
    color: inherit;
}

.fas-step-link:hover .fas-step-number {
    transform: scale(1.1);
}

.fas-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.fas-step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.fas-step.active .fas-step-number {
    background: #007cba;
    color: white;
}

.fas-step.completed .fas-step-number {
    background: #28a745;
    color: white;
}

.fas-step.completed .fas-step-number::after {
    content: '✓';
    font-size: 16px;
}

.fas-step-title {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.fas-step.active .fas-step-title {
    color: #007cba;
}

.fas-step.completed .fas-step-title {
    color: #28a745;
}

.fas-step-separator {
    width: 80px;
    height: 2px;
    background: #e9ecef;
    margin: 0 20px;
    margin-top: -25px;
}

.fas-step.completed+.fas-step-separator {
    background: #28a745;
}

/* Login Popup */
.fas-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    will-change: opacity;
    animation: fadeIn 0.2s ease;
}

.fas-popup-content {
    background: white;
    border-radius: 15px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    will-change: transform, opacity;
    animation: fadeInUp 0.2s ease;
    transform: translateZ(0);
}

.fas-popup-header {
    background: linear-gradient(135deg, #007cba, #0056b3);
    color: white;
    padding: 20px 30px;
    border-radius: 15px 15px 0 0;
    text-align: center;
}

.fas-popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.fas-popup-body {
    padding: 30px;
    text-align: center;
}

.fas-popup-body p {
    font-size: 16px;
    color: #495057;
    margin-bottom: 25px;
    line-height: 1.6;
}

.fas-popup-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Address Step */
.fas-address-step {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.fas-addresses-list h3 {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.fas-addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.fas-address-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fas-address-card:hover {
    border-color: #007cba;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.15);
}

.fas-address-card.selected {
    border-color: #28a745;
    background: #f8fff9;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.fas-address-card.selected::before {
    content: '\2713';
    position: absolute;
    top: 15px;
    left: 15px;
    background: #28a745;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.fas-address-content h4 {
    color: #333;
    font-size: 18px;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.fas-address-content p {
    margin: 8px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.fas-address-content strong {
    color: #333;
    font-weight: 600;
}

.fas-default-badge {
    background: #ffc107;
    color: #212529;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-top: 10px;
}

.fas-address-actions {
    margin-top: 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.fas-no-addresses {
    text-align: center;
    color: #666;
    font-size: 16px;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 30px;
}

/* Actions row container */
.fas-actions-row {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
}

.fas-add-address {
    flex: 1;
}

.fas-add-address .fas-btn {
    width: 100%;
}

.fas-continue-checkout {
    flex: 1;
}

.fas-continue-checkout .fas-btn {
    width: 100%;
}

/* Responsive for actions row */
@media (max-width: 768px) {
    .fas-actions-row {
        flex-direction: column;
        gap: 10px;
    }
}

/* Buttons */
.fas-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.fas-btn-primary {
    background: #007cba;
    color: white;
}

.fas-btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.fas-btn-secondary {
    background: #6c757d;
    color: white;
}

.fas-btn-secondary:hover {
    background: #545b62;
}

.fas-btn-success {
    background: #28a745;
    color: white;
}

.fas-btn-success:hover {
    background: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.fas-btn-danger {
    background: #dc3545;
    color: white;
}

.fas-btn-danger:hover {
    background: #c82333;
}

.fas-btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.fas-btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.fas-btn:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Modal */
.fas-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    will-change: opacity;
    animation: fadeIn 0.2s ease;
}

.fas-modal-content {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    will-change: transform, opacity;
    animation: fadeInUp 0.2s ease;
    transform: translateZ(0);
}

.fas-modal-header {
    background: linear-gradient(135deg, #007cba, #0056b3);
    color: white;
    padding: 20px 30px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fas-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.fas-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.fas-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.fas-modal-body {
    padding: 30px;
}

/* Form Styles */
.fas-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.fas-form-group {
    margin-bottom: 20px;
}

.fas-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.fas-form-group input,
.fas-form-group select,
.fas-form-group textarea,
.fas-search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.fas-form-group input:focus,
.fas-form-group select:focus,
.fas-form-group textarea:focus,
.fas-search-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Consistent form styles for checkout */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text,
.woocommerce-page form .form-row textarea,
.woocommerce-page form .form-row select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
.woocommerce-page form .form-row input.input-text:focus,
.woocommerce-page form .form-row textarea:focus,
.woocommerce-page form .form-row select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.woocommerce form .form-row label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 8px;
}

.fas-form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.fas-form-group input[readonly] {
    background-color: #f8f9fa !important;
    cursor: not-allowed !important;
    color: #6c757d !important;
}

.fas-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Map Styles */
.fas-map-container {
    position: relative;
}

.fas-map-search {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.fas-search-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.fas-search-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

#fas-map {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

#fas-get-location {
    margin-top: 10px;
}

/* Checkout Field Modifications */
.fas-readonly-field {
    background-color: #f8f9fa !important;
    cursor: not-allowed !important;
    position: relative;
    border-color: #e9ecef !important;
    color: #6c757d !important;
}

.fas-readonly-field:focus,
.fas-readonly-field:hover {
    border-color: #e9ecef !important;
    box-shadow: none !important;
}

.select2-container--default .select2-selection--single.fas-readonly-field {
    background-color: #f8f9fa !important;
    border-color: #e9ecef !important;
}

.select2-container--default .select2-selection--single.fas-readonly-field .select2-selection__rendered {
    color: #6c757d !important;
}

/* Checkout Overlay */
.fas-checkout-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.5);
    z-index: 1000;
    cursor: not-allowed;
}

.woocommerce-billing-fields {
    position: relative;
}

/* Remove yellow overlay from readonly fields */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
}

/* Loading States */
.fas-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.fas-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Notifications */
.fas-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 18px 25px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 1000000;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    font-size: 15px;
    line-height: 1.5;
    border-right: 4px solid rgba(255, 255, 255, 0.5);
}

.fas-notification.success {
    background: linear-gradient(135deg, #28a745, #218838);
    border-right-color: #1e7e34;
}

.fas-notification.error {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-right-color: #bd2130;
}

.fas-notification.warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    border-right-color: #d39e00;
}

.fas-notification.info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    border-right-color: #117a8b;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .fas-checkout-steps {
        flex-direction: column;
        gap: 20px;
    }

    .fas-step-separator {
        width: 2px;
        height: 40px;
        margin: 0;
        margin-left: -1px;
    }

    .fas-addresses-grid {
        grid-template-columns: 1fr;
    }

    .fas-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .fas-modal-content {
        width: 95%;
        margin: 20px;
    }

    .fas-modal-body {
        padding: 20px;
    }

    .fas-form-actions {
        flex-direction: column;
    }

    .fas-address-actions {
        justify-content: center;
    }

    .fas-popup-content {
        width: 95%;
        margin: 20px;
    }

    .fas-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .fas-step-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .fas-step-title {
        font-size: 12px;
    }

    .fas-address-card {
        padding: 15px;
    }

    .fas-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .fas-btn-large {
        padding: 14px 28px;
        font-size: 15px;
    }
}

/* Address Label Styles */
.fas-address-label {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

/* In-Store Pickup Card Styles */
.fas-pickup-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
}

.fas-pickup-card:hover {
    border-color: #22c55e;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.1);
}

.fas-pickup-card.selected {
    border-color: #22c55e;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.fas-pickup-card.selected::before {
    background: #22c55e;
}

.fas-pickup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    text-align: center;
}

.fas-pickup-title {
    color: #16a34a;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.fas-pickup-card.selected .fas-pickup-title {
    color: #000000;
}

.fas-pickup-address {
    color: #6b7280;
    font-size: 15px;
    margin: 0;
    font-weight: 500;
}

.fas-pickup-card.selected .fas-pickup-address {
    color: #374151;
}

/* Product Suggestion Popup Styles */
.fas-product-popup {
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.fas-products-swiper {
    padding: 20px 0;
}

.fas-product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.fas-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.fas-product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.fas-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fas-product-card:hover .fas-product-image img {
    transform: scale(1.05);
}

.fas-product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.fas-product-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.fas-product-category {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px 0;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
}

.fas-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #007cba;
    margin: 0 0 15px 0;
}

.fas-product-price del {
    color: #999;
    font-weight: 400;
    margin-left: 8px;
}

.fas-variation-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 15px;
    background: white;
    transition: border-color 0.3s ease;
}

.fas-variation-select:focus {
    outline: none;
    border-color: #007cba;
}

.fas-add-to-cart-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.fas-add-to-cart-btn:hover:not(:disabled) {
    background: #005a8b;
    transform: translateY(-2px);
}

.fas-add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.fas-add-to-cart-btn.added {
    background: #28a745;
}

.fas-add-to-cart-btn.added:hover {
    background: #28a745;
}

.fas-product-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: auto;
}

.fas-dismiss-product-btn {
    background: #dc3545;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.fas-dismiss-product-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.fas-no-suggestions {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* Swiper Navigation Buttons */
.fas-products-swiper .swiper-button-next,
.fas-products-swiper .swiper-button-prev {
    color: #007cba;
    background: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: -22px;
}

.fas-products-swiper .swiper-button-next:after,
.fas-products-swiper .swiper-button-prev:after {
    font-size: 18px;
    font-weight: 700;
}

.fas-products-swiper .swiper-button-next:hover,
.fas-products-swiper .swiper-button-prev:hover {
    background: #007cba;
    color: white;
}

/* Swiper Pagination */
.fas-products-swiper .swiper-pagination-bullet {
    background: #007cba;
    opacity: 0.3;
}

.fas-products-swiper .swiper-pagination-bullet-active {
    opacity: 1;
}

/* Responsive Design for Product Cards */
@media (max-width: 768px) {
    .fas-product-popup {
        width: 98%;
        margin: 10px;
    }

    .fas-product-image {
        height: 150px;
    }

    .fas-product-info {
        padding: 15px;
    }

    .fas-product-title {
        font-size: 14px;
    }

    .fas-products-swiper .swiper-button-next,
    .fas-products-swiper .swiper-button-prev {
        display: none;
    }
}