/*navbar home link for mobile*/
.mobile-home-link {
    display: none;
}

.mobile-home-link {
    display: block;
    position: absolute;
    top: 2rem;
    width: 1.7rem;
    height: 1.7rem;
}

.mobile-home-link {
    right: 4rem;
}

.mobile-home-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* cart product and info styling */
/* Main Cart Container */
.cart-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Cart Items Section */
#cartItemsContainer {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Empty Cart Message - Centered */
.empty-cart-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60vh;
    text-align: center;
    font-size: 2rem;
    color: #666;
    grid-column: 1 / -1;
    margin: 0;
}

/* Cart Item Card */
.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.cart-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Cart Item Image */
.cart-item-image {
    width: 120px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Cart Item Details */
.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item-details h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.cart-item-size {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.cart-item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000;
    margin: 0;
}

/* Cart Item Actions */
.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 0.5rem;
    background: white;
}

.quantity-controls button {
    width: 30px;
    height: 30px;
    border: none;
    background: #f5f5f5;
    color: #333;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.quantity-controls button:hover {
    background: #ddd;
    transform: scale(1.05);
}

.quantity-controls button:active {
    transform: scale(0.95);
}

.quantity-controls span {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

/* Remove Button */
.remove-btn {
    padding: 0.5rem 1rem;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.remove-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 68, 68, 0.2);
}

.remove-btn:active {
    transform: translateY(0);
}

/* Cart Summary Section */
.cart-summary {
    position: sticky;
    top: 5rem;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: fit-content;
}

.cart-summary h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
    margin: 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

/* Summary Rows */
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    font-size: 1rem;
    color: #666;
}

.summary-row:last-of-type {
    padding: 1rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #000;
    border-top: 2px solid #f0f0f0;
    border-bottom: 2px solid #f0f0f0;
}

/* Checkout Button - Black and White Theme */
.checkout-btn {
    width: 100%;
    padding: 1.25rem;
    background: #000;
    color: white;
    border: 2px solid #000;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.checkout-btn:hover {
    background: white;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.checkout-btn:active {
    transform: translateY(-1px);
}

.checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Continue Shopping Link */
.continue-shopping {
    text-align: center;
    padding-top: 1rem;
}

.continue-shopping a {
    color: #000;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.continue-shopping a:hover {
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .cart-summary {
        position: static;
        order: -1;
    }

    .cart-item {
        grid-template-columns: 100px 1fr auto;
        gap: 1rem;
        padding: 1rem;
    }

    .cart-item-image {
        width: 100px;
        height: 130px;
    }

    .cart-item-details h3 {
        font-size: 1rem;
    }

    .cart-item-actions {
        flex-direction: row;
        gap: 0.5rem;
    }

    .empty-cart-msg {
        font-size: 1.5rem;
        height: 40vh;
    }
}

@media (max-width: 480px) {
    .cart-container {
        padding: 0.5rem;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
        gap: 0.75rem;
    }

    .cart-item-image {
        width: 80px;
        height: 100px;
        grid-row: 1 / 3;
    }

    .cart-item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
    }

    .cart-summary {
        padding: 1.5rem;
    }

    .checkout-btn {
        padding: 1rem;
    }

    .empty-cart-msg {
        font-size: 1.2rem;
        height: 35vh;
    }
}

/* form dialog styling */

/* Checkout Dialog */
.checkout-dialog {
    position: fixed;
    top: 90%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    border: none;
    border-radius: 16px;
    background: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 0;
    overflow: hidden;
    animation: dialogSlideIn 0.3s ease-out;
}

@keyframes dialogSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.checkout-dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
    animation: backdropFadeIn 0.3s ease-out;
}

@keyframes backdropFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Dialog Header */
.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid #f0f0f0;
    background: white;
}

.dialog-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.close-dialog-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f5f5f5;
    color: #333;
    font-size: 1.8rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.close-dialog-btn:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

.close-dialog-btn:active {
    transform: scale(0.95);
}

/* Checkout Form */
.checkout-form {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: calc(90vh - 150px);
    overflow-y: auto;
}

/* Form Group */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.required {
    color: #ff4444;
    font-weight: 700;
}

/* Form Inputs */
.checkout-form input {
    width: 100%;
    padding: 0.95rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    color: #111;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.checkout-form input::placeholder {
    color: #999;
}

.checkout-form input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.checkout-form input:hover:not(:focus) {
    border-color: #bbb;
}

.checkout-form input.valid {
    border-color: #22c55e;
    background: #f0fdf4;
}

.checkout-form input.invalid {
    border-color: #ff4444;
    background: #fef2f2;
}

/* Error Message */
.error-message {
    font-size: 0.8rem;
    color: #ff4444;
    font-weight: 500;
    min-height: 1.2rem;
    display: block;
}

/* Form Row for Multiple Columns */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    margin-top: 1rem;
}

.cancel-btn,
.submit-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid #000;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.cancel-btn {
    background: white;
    color: #000;
}

.cancel-btn:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

.cancel-btn:active {
    transform: translateY(0);
}

.submit-btn {
    background: #000;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.submit-btn:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design */
@media (max-width: 600px) {
    .checkout-dialog {
        width: 95%;
        max-height: 95vh;
    }

    .dialog-header {
        padding: 1.5rem;
    }

    .dialog-header h2 {
        font-size: 1.25rem;
    }

    .checkout-form {
        padding: 1.5rem;
        gap: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cancel-btn,
    .submit-btn {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
}

