/* Bootstrap 5.3 Container and Layout */
.container-md {
    width: 100%;
    padding-right: var(--bs-gutter-x, 0.75rem);
    padding-left: var(--bs-gutter-x, 0.75rem);
    margin-right: auto;
    margin-left: auto;
  }
  @media (min-width: 768px) {
    .container-md {
      max-width: 720px;
    }
  }
  @media (min-width: 992px) {
    .container-md {
      max-width: 960px;
    }
  }
  @media (min-width: 1200px) {
    .container-md {
      max-width: 1140px;
    }
  }
  
  /* Flexbox utilities */
  .d-flex {
    display: flex !important;
  }
  
  .justify-content-center {
    justify-content: center !important;
  }
  
  /* Spacing utilities */
  .mb-3 {
    margin-bottom: 1rem !important;
  }
  
  .mb-4 {
    margin-bottom: 1.5rem !important;
  }
  
  .mx-3 {
    margin-right: 1rem !important;
    margin-left: 1rem !important;
  }
  
  .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  /* Borders */
  .border {
    border: 1px solid #dee2e6 !important;
  }
  
  .rounded-1 {
    border-radius: 0.2rem !important;
  }
  
  /* Forms */
  .form-label {
    margin-bottom: 0.5rem;
  }
  
  .form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  }
  
  .form-text {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6c757d;
  }
  
  /* Modal */
  .modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1055;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    background-color: rgba(0, 0, 0, 0.5);
  }
  
  .modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: none;
  }
  
  .modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.3rem;
    outline: 0;
  }
  
  .modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(0.3rem - 1px);
    border-top-right-radius: calc(0.3rem - 1px);
  }
  
  .modal-title {
    margin-bottom: 0;
    line-height: 1.5;
  }
  
  .modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
    overflow-x: hidden;
  }
  
  /* Row */
  .row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(-1 * var(--bs-gutter-y));
    margin-right: calc(-.5 * var(--bs-gutter-x));
    margin-left: calc(-.5 * var(--bs-gutter-x));
  }
  
  /* Custom styles for specific elements */
  .product-container {
    background-color: #fff;
  }
  
  .buy-bar {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
  }
  
  .buy-barinner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem;
  }
  
  .product-image img {
    max-width: 100%;
    height: auto;
  }
  
  .product-name {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
  }
  
  .product-price {
    font-weight: 500;
    margin-bottom: 1rem;
  }
  
  /* Utilities for custom elements */
  [style*="display:none"] {
    display: none !important;
  }
  .btn-outline-warning {
    color: #ffc107;
    border-color: #ffc107;
  }
  
  .btn-outline-warning:hover {
    color: #000;
    background-color: #ffc107;
    border-color: #ffc107;
  }
  
  .btn-outline-warning:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.5);
  }
  
  .btn-outline-warning:active {
    color: #000;
    background-color: #ffc107;
    border-color: #ffc107;
  }
  
  .btn-outline-warning:disabled {
    color: #ffc107;
    background-color: transparent;
    border-color: #ffc107;
    opacity: 0.65;
  }
  /* Bootstrap 5.3 Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100vw;
    height: 100vh;
    background-color: #000;
  }
  
  .modal-backdrop.fade {
    opacity: 0;
  }
  
  .modal-backdrop.show {
    opacity: 0.5;
  }
  
  /* Improved Modal Styles */
  .modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1055;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
  }
  
  .modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
  }
  
  .modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    outline: 0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  }
  
  /* Improved Button Styles */
  .btn {
        display: inline-block;
        font-weight: 400;
        line-height: 1.5;
        color: #212529;
        text-align: center;
        text-decoration: none;
        vertical-align: middle;
        cursor: pointer;
        -webkit-user-select: none;
        -moz-user-select: none;
        user-select: none;
        background-color: transparent;
        border: 1px solid transparent;
        padding: .375rem .75rem;
        font-size: 1rem;
        border-radius: .25rem;
        transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    }
  
  .btn-primary {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
    border: 1px solid transparent;
  }
  
  .btn-primary:hover {
    color: #fff;
    background-color: #0b5ed7;
    border-color: #0a58ca;
  }
  
  .btn-outline-primary {
    color: #0d6efd;
    background-color: transparent;
    border: 1px solid #0d6efd;
  }
  
  .btn-outline-primary:hover {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
  }
  
  /* Product Page Specific Styles */
  .product-container {
    background-color: #fff;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
  }
  
  .product-content {
    flex: 1;
    padding: 0 1.5rem;
  }
  
  .product-buy {
    text-align: right;
    min-width: 150px;
  }
  
  .product-price {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
  }
  
  /* Cart Modal Specific Styles */
  .cart-data-row {
    margin-bottom: 1rem;
  }
  
  /* Form Controls in Modal */
  .form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  }
  
  .form-control:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  }
  
  /* Add to cart button styles */
  .add-to-cart, .btn-outline-primary {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    min-width: 120px;
  }
  
  /* Order now button styles */
  .order-now {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    margin-top: 1rem;
  }
  
  /* Go to cart styles */
  .go-to-cart {
    min-width: 150px;
    margin-left: 1rem;
  }
  
  /* Remove button styles */
  .btn-outline-warning {
    color: #ffc107;
    border: 1px solid #ffc107;
    background-color: transparent;
  }
  
  .btn-outline-warning:hover {
    color: #000;
    background-color: #ffc107;
    border-color: #ffc107;
  }
  
  /* Payment method styles */
  .card {
    position: relative;
    display: flex
;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, .125);
    border-radius: .25rem;
}
.input-group {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
  }
  
  .input-group > .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
  }
  
  .input-group-text {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    white-space: nowrap;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
  }
  .card-body {
    flex: 1 1 auto;
    padding: 1rem 1rem;
}
.btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}
.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}
.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
  }
.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    margin-left: -1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3), .input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.w-100 {
    width: 100%;
}
.form-check {
    display: flex;
    align-items: center;
    padding-left: 1.75rem;
    margin-bottom: 1rem;
  }
  
  .form-check-input {
    position: absolute;
    margin-left: -1.75rem;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.25rem;
    vertical-align: top;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid rgba(0, 0, 0, 0.25);
    appearance: none;
  }
  
  .form-check-input[type="radio"] {
    border-radius: 50%;
  }
  
  .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
  }
  
  .form-check-input:checked[type="radio"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
  }
  
  .form-check-label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
  }
  
  .form-check-label img {
    margin-left: 0.75rem;
    max-height: 40px;
    width: auto;
  }
  
  /* Payment option styles */
  .payment-option {
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    background-color: #fff;
  }
  
  .payment-option:hover {
    background-color: #f8f9fa;
  }
  
  .payment-option .form-check-input {
    margin-top: 0;
  }

  .payment-option label {
    width: 100%;
  }
  .buy-bar__subtotal, .modal-title {
    margin-top: 0;
    color: #000;
    font-size: 20px;
    font-weight: bold;
  }
  .close {
    cursor: pointer;
  }