/* General reset */
body {
    margin: 0;
    padding: 0;
    font-family: "Open Sans", Arial, sans-serif;
    background-color: #fdfdfd;
    color: #333;
    line-height: 1.6;
}

/* Header */
header {
    background-color: #f4f9f8; /* soft seafoam */
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

header h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0;
    font-weight: 700; /* bold Open Sans */
}

/* Navigation */
nav {
    margin-top: 10px;
}

nav a {
    color: #2c3e50;
    text-decoration: none;
    margin: 0 10px;
    font-weight: 600; /* semi-bold for clarity */
}

nav a:hover {
    color: #16a085; /* teal accent */
}

/* Content area */
.container {
    max-width: 960px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Messages */
.messages {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.messages li {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 0.95rem;
}

.messages li.success {
    background-color: #e0f7e9;
    color: #2e7d32;
}

.messages li.error {
    background-color: #fdecea;
    color: #c62828;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns by default */
    gap: 20px;
    margin-top: 20px;
}

/* Tablet view: 2 columns */
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile view: 1 column */
@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Product cards */
.product-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    background-color: #fff;
    transition: box-shadow 0.3s ease;
    text-align: center;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-card img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.product-card h3 {
    margin-top: 10px;
    font-size: 1.4rem;
    color: #2c3e50;
    font-weight: 600;
}

.product-card p {
    margin: 8px 0;
    color: #555;
    font-size: 0.95rem;
}

.product-card strong {
    color: #16a085;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Cart table */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.95rem;
}

.cart-table th, .cart-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.cart-table th {
    background-color: #f4f9f8;
    color: #2c3e50;
    font-weight: 600;
}

.cart-table img {
    max-height: 80px;
    border-radius: 4px;
}

.cart-actions a {
    display: inline-block;
    padding: 6px 12px;
    background: #c0392b;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
}

.cart-actions a:hover {
    background: #e74c3c;
}

.checkout-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: #16a085;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}

.checkout-btn:hover {
    background: #1abc9c;
}

/* Info sections (Return Policy, Shipping Info) */
.info-section {
    margin-top: 40px;
    padding: 20px;
    background-color: #f4f9f8;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.75rem;
}

.info-section h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 14px; /* adjust this value as needed */
}

.info-section h3 {
    margin-top: 20px;
    color: #16a085;
    font-weight: 600;
}

.info-section ul {
    margin: 10px 0 20px 20px;
    list-style: disc;
}

/* Collapsible info sections */
.info-section details {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #f4f9f8;
}

.info-section summary {
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: #2c3e50;
    list-style: none;
}

.info-section summary::-webkit-details-marker {
    display: none; /* hide default arrow */
}

.info-section details[open] {
    background-color: #eaf5f4;
    border-color: #16a085;
}

/* Unified button styles */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.3s ease;
}

/* Add to Cart button */
.btn-add {
    background: #16a085;
    color: #fff;
}

.btn-add:hover {
    background: #1abc9c;
}

/* Remove button */
.btn-remove {
    background: #c0392b;
    color: #fff;
}

.btn-remove:hover {
    background: #e74c3c;
}

/* Sold label */
.sold-label {
    display: inline-block;
    padding: 6px 12px;
    background: #c62828;
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Order summary */
.order-summary {
    margin-bottom: 30px;
}

.order-summary ul {
    list-style: none;
    padding: 0;
}

.order-summary li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.order-summary img {
    max-height: 60px;
    margin-right: 10px;
    border-radius: 4px;
}

/* Checkout form */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checkout-form label {
    font-weight: 600;
    color: #2c3e50;
}

.checkout-form input,
.checkout-form textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: "Open Sans", Arial, sans-serif;
    font-size: 0.95rem;
    width: 100%;
}

.checkout-form textarea {
    min-height: 80px;
    resize: vertical;
}

/* Payment success page */
.success-page {
    text-align: center;
    margin-top: 50px;
}

.success-page h2 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 20px;
}

.success-page p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 30px;
}

/* Success page */
.success-page {
    text-align: center;
    margin-top: 50px;
}

.success-page h2 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 20px;
}

.success-page p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 15px;
}

/* Brand tagline */
.brand-tagline {
    font-size: 1.1rem;
    color: #555;
    text-align: center;
    margin: 15px auto 30px auto;
    max-width: 720px;
    line-height: 1.6;
    font-style: italic;
}

/* Logo beside title */
header h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* space between logo and text */
}

header h2 .logo {
    height: 100px; /* adjust size */
    width: auto;
}

/* Checkout container for responsive layout */
.checkout-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Order summary and form side by side on desktop */
.order-summary {
    flex: 1;
}

.checkout-form {
    flex: 1;
}

/* Mobile view: stack vertically */
@media (max-width: 768px) {
    .checkout-container {
        flex-direction: column;
    }

    .order-summary,
    .checkout-form {
        width: 100%;
    }
}
