/* Base product gallery */
.product-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.product-gallery img {
    max-width: 250px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Variant selector dropdown */
.variant-selector {
    margin: 20px 0;
}

.variant-selector label {
    margin-right: 10px;
    font-weight: bold;
}

.variant-selector select {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* Variant image styling */
.variant-image {
    max-width: 200px;
    margin: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Product details section */
#product-details {
    margin-top: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #eee;
}

#product-details p {
    margin: 5px 0;
}

/* NOTE:
   Do not override the global .btn-primary here.
   The navbar "Book Now" button must keep the same look as the home page.
*/

/* Add to Cart form styling */
#add-to-cart-form {
    margin-top: 20px;
}

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

.cart-table th, .cart-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

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

.qty-input {
    width: 60px;
    padding: 5px;
    text-align: center;
}

.cart-summary {
    margin-top: 20px;
    text-align: right;
    font-size: 18px;
}

.btn-secondary {
    padding: 6px 12px;
    background: #6c757d;
    color: #fff;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

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

.btn-danger {
    padding: 6px 12px;
    background: #dc3545;
    color: #fff;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

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


/* NOTE: .btn-primary colour is set globally in landing.css (--secondary deep navy).
   No override needed here. */

/* Product list page */
.product-list {
    max-width: 1240px;
    margin: 2rem auto 3rem;
    padding: 0 1.25rem;
}

.product-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.product-list-header h1 {
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.product-list-header p {
    color: var(--text-light);
}

/* ── Compact View Cart button in the page header ── */
.btn-cart-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary) !important;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-cart-compact i {
    font-size: 0.9rem;
}

.btn-cart-compact:hover {
    background: var(--secondary);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ── Search form ── */
.search-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
    background: #fff;
    border: 1.5px solid var(--gray);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 0.8rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form:focus-within {
    border-color: var(--secondary-light);
    box-shadow: 0 0 0 3px rgba(44, 107, 128, 0.12), var(--shadow-sm);
}

/* Grouped selects sit together */
.search-selects {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Icon-prefixed text input wrapper */
.search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
}

.search-input-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--text-light);
    font-size: 0.88rem;
    pointer-events: none;
}

.search-input-wrap input[type="text"] {
    width: 100%;
    padding: 0.6rem 0.75rem 0.6rem 2.2rem;
    border: 1.5px solid #d7ccc0;
    border-radius: 10px;
    font-size: 0.95rem;
    min-height: 42px;
    background: #fdfaf8;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.search-input-wrap input[type="text"]:focus {
    border-color: var(--secondary-light);
    box-shadow: 0 0 0 3px rgba(44, 107, 128, 0.1);
    background: #fff;
}

.search-form select {
    padding: 0.6rem 2rem 0.6rem 0.75rem;
    border: 1.5px solid #d7ccc0;
    border-radius: 10px;
    font-size: 0.9rem;
    min-height: 42px;
    background: #fdfaf8;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%235b6b70' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 1.1rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form select:focus {
    border-color: var(--secondary-light);
    box-shadow: 0 0 0 3px rgba(44, 107, 128, 0.1);
    background-color: #fff;
}

.search-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.3rem;
    background: var(--secondary);
    color: #fff;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    min-height: 42px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px -4px rgba(29, 78, 95, 0.4);
    white-space: nowrap;
}

.search-btn i {
    font-size: 0.82rem;
}

.search-btn:hover {
    background: var(--secondary-light);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -6px rgba(29, 78, 95, 0.45);
}

/* Product grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.1rem;
    list-style: none;
    padding: 0;
}

.product-card {
    border: 1px solid var(--gray);
    border-radius: 14px;
    padding: 0.85rem;
    background: #fff;
    box-shadow: var(--shadow-sm);
    color: var(--text-dark);
    transition: var(--transition);
    font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

.product-card img.product-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    background: #f7f7f7;
}

.product-card h2 {
    font-size: 1.02rem;
    margin-top: 0.75rem;
    margin-bottom: 0.35rem;
    color: var(--secondary);
}

.product-description {
    color: var(--text-light);
    font-size: 0.92rem;
    min-height: 2.7rem;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.product-price {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1a3a5e;   /* deep navy-blue – darker & more distinctly blue than --secondary */
    letter-spacing: 0.01em;
}

.stock-pill {
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.28rem 0.55rem;
}

.stock-pill.in-stock {
    background: #e6f6ee;
    color: #197a4f;
}

.stock-pill.preorder {
    background: #fff4dd;
    color: #8a6113;
}

.stock-pill.out-stock {
    background: #fdebea;
    color: #b34040;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}


/* Pagination */
.pagination {
    margin-top: 2rem;
    text-align: center;
}

.pagination a {
    margin: 0 0.4rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid #d7ccc0;
    border-radius: 999px;
    color: var(--secondary);
    background: #fff;
    text-decoration: none;
    font-weight: 600;
}

.pagination a:hover {
    background: var(--secondary);
    color: #fff;
}

.pagination-state {
    color: var(--text-light);
    margin: 0 0.6rem;
}

.no-products {
    margin-top: 1.2rem;
    padding: 1.2rem;
    border: 1px solid var(--gray);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

@media (max-width: 740px) {
    .product-list-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-cart-compact {
        align-self: flex-start;
    }

    .search-selects {
        flex: 1 1 100%;
    }

    .search-btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}