/* Product Display */
.options-container {
    display: grid;
    grid-template-columns: 1fr 30%;
    align-content: center;
}

.no-image,
.product-image {
    height: 240px;
    width: 100%;
    object-fit: contain; /* This will maintain the aspect ratio of the image */
    background-color: white;
    border-radius: 12px;
    display: none; /* Hide all images by default */
}

.no-image {
    background-color: white;
}

.product-title {
    font-size: 16px;
    font-weight: bold;
}

.product-price {
    font-size: 16px;
    font-weight: bold;
}

/* Grid Layout */
.option-element {
    align-content: center;
    height: 39px;
    background-color: white !important;
}
.option-element.product-title {
    grid-column: 1 / span 2;
    grid-row: 1;
    background-color: blue;
}

.option-element.product-description {
    grid-column: 1 / span 2;
    grid-row: 2;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* limit to 2 lines */
    -webkit-box-orient: vertical;
}

.option-element.product-price {
    grid-column: 2;
    grid-row: 3;
    text-align: center;
    background-color: green;
}

.option-element.color-label {
    grid-column: 1;
    grid-row: 3;
    font-size: 14px;
    background-color: yellow;
}

.option-element.color-selector {
    grid-column: 1;
    grid-row: 4;
    background-color: red;
}

.option-element.size-selector {
    grid-column: 2;
    grid-row: 4;
    font-size: 12px;
    text-align: center;
    background-color: purple;
}

.option-element.quantity-selector {
    grid-column: 1;
    grid-row: 5;
}

.option-element.total-price {
    grid-column: 2;
    grid-row: 5;
    text-align: center;
}

/* Buttons */
.add-to-cart-button,
.checkout-button {
    background-color: #90ee90;
    color: #707070;
    border: none;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.add-to-cart-button {
    margin-top: 10px;
    width: 100%;
    text-align: center;
    display: inline-block;
    height: 36px;
}

.checkout-button {
    padding: 10px 20px;
    display: inline-block;
    height: 36px;
}

.confirm-nav-button {
    background-color: #90ee90;
}

.cancel-nav-button {
    background-color: #e84039;
    color: white;
}

.remove-btn {
    background-color: #e84039;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.add-to-cart-button:hover,
.confirm-nav-button:hover,
.cancel-nav-button:hover,
.remove-btn:hover {
    background-color: #f39200;
    color: white;
}

/* Cart Table */
.cart-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    padding: 0px;
}

.cart-table tbody tr.odd-row {
    background-color: #f0f0f0;
}

.cart-table tbody tr.even-row {
    background-color: #e8e8e8;
}

.cart-table th,
.cart-table td {
    text-align: center;
}

.text-left {
    text-align: left !important;
}

.price-column {
    text-align: right;
}

.cart-table tfoot {
    background-color: #f5f5f5;
}

.cart-table tfoot .total-label {
    font-weight: bold;
}

.cart-table tfoot .total-price {
    font-weight: bold;
    font-size: 1.2em;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: left;
}

.quantity-form {
    display: flex;
    align-items: center;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background-color: #f8f8f8;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.quantity-btn:hover:not([disabled]) {
    background-color: #f39200;
    color: white;
    border-color: #f39200;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-value {
    width: 44px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

/* Cart Summary & Checkout */
.cart-summary {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.guest-checkout-notice {
    margin-top: 10px;
    font-size: 0.9em;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 10px;
    width: 100%;
}

/* Checkout Page */
.checkout-container {
    padding: 25px;
}

.checkout-section {
    margin-bottom: 25px;
}

.checkout-title {
    color: #333;
    font-size: 1.4em;
    margin-bottom: 15px;
    text-align: center;
}

.checkout-description {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
}

.guest-checkout-form {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.form-fields p {
    margin-bottom: 15px;
}

.form-fields label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-fields input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.checkout-options {
    text-align: center;
}

.checkout-options p {
    margin: 15px 0;
}

/* Links */
.styled-link {
    color: #f39200;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.styled-link:hover {
    color: #e84039;
    text-decoration: underline;
}

.color-samples {
    display: flex;
    gap: 0px 8px;
    vertical-align: middle;
    align-items: center;
}

.color-sample {
    width: 28px;
    aspect-ratio: 1;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #ddd;
}

.color-sample:hover {
    transform: scale(1.1);
}

.color-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-sample-cart {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #ddd;
    display: inline-block;
}

/* Fix for white + sign */
.quantity-btn {
    color: #333; /* Darker text color to ensure visibility */
}

.quantity-btn:hover:not([disabled]) {
    background-color: #f39200;
    color: white;
    border-color: #f39200;
}

v .cart-table {
    display: block;
    width: 100%;
}

.cart-table thead {
    display: none; /* Hide header on small screens */
}

.cart-table tbody,
.cart-table tr,
.cart-table tfoot {
    display: block;
    width: 100%;
}

.cart-table td {
    display: flex;
}

.cart-table td.product-name {
    grid-column: 1 / span 2;
    grid-row: 1;
    font-weight: bold;
    font-size: 1.1em;
}

.cart-table td.product-description {
    grid-column: 1 / span 3;
    grid-row: 2;
}

.cart-table td.product-color {
    grid-column: 1 / span 2;
    grid-row: 3;
}

.cart-table td.product-quantity {
    grid-column: 1;
    grid-row: 4;
}

.cart-table td.product-price {
    grid-column: 3;
    grid-row: 4;
    justify-content: right;
}

.cart-table td.product-actions {
    grid-column: 3;
    grid-row: 1;
    justify-content: right;
}

/* Make each product a grid container */
.cart-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

/* Cart summary buttons */
.cart-summary {
    flex-direction: column;
    gap: 10px;
}

.checkout-button {
    width: 100%;
    text-align: center;
    height: 44px; /* Fixed height */
    line-height: 24px; /* Vertically center text */
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-table tfoot tr {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.cart-table tfoot td {
    display: block;
    width: 100%;
}

.cart-table tfoot td.total-quantity {
    grid-column: 1;
    grid-row: 1;
    text-align: left;
}

.cart-table tfoot td.total-price {
    grid-column: 3;
    grid-row: 1;
    text-align: right;
}

.cart-table tfoot td:empty {
    display: none;
}

.color-sample,
.color-sample-cart {
    position: relative;
    overflow: hidden;
}

.slider-container {
    position: relative;
    width: 100%;
    max-height: 240px; /* Match your original height */
}

.slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.product-image.active {
    display: block;
}

.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: black;
    border: none;
    font-size: 24px;
    padding: 8px;
    opacity: 0.6;
    transition: opacity 0.3s;
    z-index: 2;
}

.prev {
    left: 5px;
}

.next {
    right: 5px;
}

.prev:hover,
.next:hover {
    opacity: 1;
}
