/* --- STYLES FOR GOOGLE BUTTON --- */
.google-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    background-color: #fff;
    color: #3c4043;
    /* Google's standard text color */

    border-radius: 8px;
    /* Slightly more rounded */
    border: 1px solid #dcdcdc;

    padding: 10px 24px;
    font-size: 1em;
    /* Adjusted for better proportion */
    font-weight: 500;
    /* Medium weight is cleaner than bold */
    font-family: 'Roboto', sans-serif;
    /* Using Google's font */

    text-decoration: none;
    cursor: pointer;
    transition: background-color .3s, box-shadow .3s;
}

.google-login-btn:hover {
    background-color: #f8f9fa;
    /* A very light grey for hover */
    border-color: #c6c6c6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.google-login-btn svg {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    /* The background and padding on the SVG are no longer needed */
}

/* --- END GOOGLE BUTTON STYLES --- */

main {
    padding: 20px;
    /* Add padding to main content area */
}

h2 {
    color: #333;
}

#hello-message {
    font-size: 1.5em;
    color: #666;
    margin-bottom: 30px;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding-bottom: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    margin-bottom: 10px;
}

.product-card h3 {
    margin: 10px 0;
    color: #555;
    font-size: 1.2em;
}

.product-card p {
    color: #777;
    font-size: 0.9em;
    padding: 0 15px;
    margin-bottom: 10px;
}

.product-card .price {
    font-size: 1.1em;
    color: #007bff;
    font-weight: bold;
}

.product-card .promo-price {
    font-size: 1.1em;
    color: #dc3545;
    font-weight: bold;
    margin-left: 5px;
}

.product-card .original-price {
    text-decoration: line-through;
    color: #888;
    font-size: 0.9em;
    margin-left: 5px;
}

.cart-empty-message {
    text-align: center;
    font-size: 1.2em;
    color: #777;
    padding: 40px 0;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.cart-table th,
.cart-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    vertical-align: middle;
}

.cart-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.cart-item-details {
    display: flex;
    align-items: center;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-info .item-name {
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
}

.cart-item-info .item-sku {
    font-size: 0.9em;
    color: #666;
}


.quantity-input {
    width: 60px;
    padding: 8px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.remove-item-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.remove-item-btn:hover {
    background-color: #c82333;
}

/* Form Section Styles */
.form-section {
    margin-top: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.form-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4em;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

.form-group input[type="radio"] {
    margin-right: 8px;
    vertical-align: middle;
}

.form-group label[for^="shipping-standard"],
.form-group label[for^="shipping-fast"] {
    font-weight: normal;
}


.cart-summary {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.cart-summary h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.5em;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.summary-row.grand-total {
    font-weight: bold;
    font-size: 1.3em;
    color: #007bff;
    border-top: 1px solid #ccc;
    padding-top: 10px;
    margin-top: 10px;
}

.cart-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.cart-actions .btn {
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    text-align: center;
}

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

.btn-secondary:hover {
    background-color: #5a6268;
}

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

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

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

.btn-primary:hover {
    background-color: #0056b3;
}

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

.btn-success:hover {
    background-color: #218838;
}

.simple-header nav #cart-link.active {
    font-weight: bold;
    color: #0056b3;
}

.order-card {
    background-color: #fff;
    border: 1px solid #dddfe2;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    overflow: hidden;
}

.order-header {
    background-color: #f5f6f7;
    padding: 15px 20px;
    border-bottom: 1px solid #dddfe2;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.order-header-main-info .order-id {
    font-weight: bold;
    font-size: 1.1em;
    color: #0056b3;
}

.order-header-main-info .order-date {
    font-size: 0.9em;
    color: #606770;
}

.order-status {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    text-transform: uppercase;
}

/* Dynamic status classes for Jinja */
.status-delivered {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-shipped {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.status-processing {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-unknown,
.status-default {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.order-total-header {
    font-size: 1.1em;
    font-weight: bold;
    text-align: right;
}

.order-total-header span {
    font-weight: normal;
    color: #333;
}

.order-body {
    padding: 20px;
}

.order-body h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #333;
}

.order-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.order-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-image img {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.order-item-details {
    flex-grow: 1;
}

.order-item-details .item-title {
    font-weight: bold;
    color: #333;
    margin: 0 0 5px 0;
}

.order-item-details .item-sku,
.order-item-details .item-qty,
.order-item-details .item-price {
    font-size: 0.9em;
    color: #606770;
    margin: 2px 0;
}

.order-item-details .item-subtotal {
    font-size: 0.95em;
    color: #1c1e21;
    margin-top: 5px;
    font-weight: 500;
}

.shipping-details {
    margin-top: 20px;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    font-size: 0.95em;
}

.shipping-details h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.shipping-details p {
    margin: 4px 0;
    color: #333;
}

.payment-details {
    margin-top: 20px;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    font-size: 0.95em;
}

.payment-details h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.payment-details p {
    margin: 4px 0;
    color: #333;
}


#no-orders-message {
    text-align: center;
    font-size: 1.2em;
    color: #606770;
    padding: 40px 0;
    background-color: #fff;
    border-radius: 8px;
}

/* Basic body and container styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: #f0f2f5;
    color: #1c1e21;
    line-height: 1.6;
}

.simple-header {
    padding: 1em 20px;
    border-bottom: 1px solid #dddfe2;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.simple-header .site-title-link {
    color: #333;
    text-decoration: none;
    font-size: 1.5em;
    font-weight: bold;
}

.simple-header nav a {
    color: #007bff;
    text-decoration: none;
    margin-left: 15px;
}


.container {
    max-width: 900px;
    margin: auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Product display styles */
.product-header {
    text-align: center;
    margin-bottom: 30px;
}

.product-header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.product-header .category {
    font-size: 1.1em;
    color: #666;
}

.product-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
}

.product-image-container {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.product-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.product-details {
    flex: 2;
    min-width: 400px;
}

.product-details p {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 15px;
}

.price-section {
    margin: 20px 0;
    font-size: 1.5em;
    font-weight: bold;
}

.display-price {
    color: #007bff;
}

.display-original-price {
    text-decoration: line-through;
    color: #888;
    margin-left: 10px;
    font-size: 0.8em;
}

.product-sku-stock-info p {
    margin: 8px 0;
    font-size: 1em;
    color: #444;
}

.product-options-selector-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.product-options-selector-section h2 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.product-option-group {
    margin-bottom: 15px;
}

.product-option-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #444;
}

/* Styles for select dropdowns */
.product-option-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: white;
    font-size: 1em;
}

/* Styles for single-value attributes displayed as plain text */
.product-option-group .single-option-text {
    font-size: 1em;
    /* Consistent font size */
    color: #333;
    /* Standard text color, adjust as needed */
    margin: 0;
    /* Reset default paragraph margins for cleaner layout */
    padding: 5px 0;
    /* Vertical spacing, to align visually with select content */
    /* Ensures it does not look like an input box: no border, no special background, auto width */
}

/* Quantity Selector Style */
.quantity-selector-section {
    margin-top: 20px;
    margin-bottom: 20px;
}

.quantity-selector-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
}

.quantity-selector-section input[type="number"] {
    width: 80px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    text-align: center;
    box-sizing: border-box;
}

/* "Add to Cart" Button Style */
#placeholder-add-to-cart-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1.1em;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    /* Adjusted margin-top */
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

#placeholder-add-to-cart-btn:hover {
    background-color: #218838;
}

#placeholder-add-to-cart-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Related Products Styles */
.related-products-section {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.related-products-section h2 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 20px;
}

.related-product-card {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.related-product-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.related-product-info {
    flex-grow: 1;
}

.related-product-info a {
    text-decoration: none;
    color: #0056b3;
    font-weight: bold;
}

.related-product-info a:hover {
    text-decoration: underline;
}

.related-product-info p {
    margin: 5px 0;
    font-size: 0.95em;
}

.related-product-info .current-price,
.related-product-info .promo-price {
    font-weight: bold;
    color: #333;
}

.related-product-info .promo-price {
    color: #dc3545;
}

.related-product-info .original-price {
    text-decoration: line-through;
    color: #888;
    font-size: 0.9em;
    margin-right: 5px;
}


.back-link {
    display: block;
    margin-top: 40px;
    text-align: center;
    font-size: 1.1em;
}

.back-link a {
    color: #007bff;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

/* --- POPUP STYLES --- */
.toast-popup {
    visibility: hidden; /* Hidden by default */
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    transform: translateX(-50%);
    bottom: 30px;
    font-size: 17px;
    white-space: nowrap;
}

/* Class to trigger the animation */
.toast-popup.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* Animation keyframes */
@-webkit-keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@-webkit-keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}

@keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}
/* --- END POPUP STYLES --- */