/* Collection Page Styles */

/* Search Box Styles */
.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box .form-control {
    padding-right: 4rem;
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    transition: all 0.3s ease;
}

.search-box .form-control:focus {
    border-color: #bfa37c;
    box-shadow: 0 0 0 0.25rem rgba(191, 163, 124, 0.25);
}

.search-box .btn {
    color: #bfa37c;
    background: transparent;
    border: none;
    padding: 0 1rem;
    transition: all 0.3s ease;
}

.search-box .btn:hover {
    color: #fff;
}

#searchResultsCount {
    color: #bfa37c;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Hide product cards with d-none */
.product-card.d-none {
    display: none !important;
}

.collection-header {
    padding: 4rem 0;
    background-color: #f8f9fa;
    margin-bottom: 2rem;
    width: 100%;
}

.product-card {
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
    background: #1a1a1a;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 350px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.product-image-container {
    position: relative;
    width: 100%;
    background: #1a1a1a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    min-height: 300px;
}

.product-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #bfa37c;
    color: #000;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-view-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.product-card:hover .quick-view-overlay {
    opacity: 1;
}

.quick-view-btn {
    background: #bfa37c;
    color: #000;
    border: none !important;
    padding: 8px 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: all 0.3s ease !important;
}

.quick-view-btn:hover {
    background: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.collection-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

footer .container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 2rem 15px;
}

#productGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

#quickViewModal .modal-dialog {
    max-width: 900px;
    margin: 2rem auto;
}

#quickViewModal .modal-content {
    background: #181818;
    border-radius: 10px;
    border: none;
    box-shadow: 0 6px 32px rgba(0,0,0,0.6);
    min-width: 700px;
    max-width: 900px;
    width: 100%;
}

#quickViewModal .modal-body {
    padding: 0;
    width: 100%;
    min-height: 420px;
    max-height: 80vh;
    overflow: hidden;
}

#quickViewModal .row.g-0 {
    height: 100%;
    min-height: 420px;
    max-height: 80vh;
}

#quickViewModal .col-lg-4, #quickViewModal .col-lg-8 {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

#quickViewImageContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 320px;
    padding: 32px;
    box-sizing: border-box;
    background: #222;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

#quickViewImageContainer img {
    display: block;
    margin: auto;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.5);
    background: #444;
}

#quickViewModal .col-lg-8 {
    justify-content: flex-start;
    padding: 0;
    min-width: 320px;
    min-height: 420px;
    max-height: 80vh;
    overflow-y: auto;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    #quickViewModal .modal-content {
        min-width: 320px;
        max-width: 98vw;
    }
    #quickViewModal .modal-body {
        max-height: 90vh;
    }
    #quickViewModal .row.g-0 {
        flex-direction: column;
        max-height: 90vh;
    }
    #quickViewImageContainer {
        min-height: 180px;
        padding: 18px 18px 0 18px;
        border-radius: 10px 10px 0 0;
    }
    #quickViewModal .col-lg-8 {
        padding: 18px;
        min-height: 180px;
        max-height: 60vh;
    }
}


#quickViewModal .modal-content {
    display: flex;
    flex-direction: row;
    background: #181818;
    border-radius: 10px;
    border: none;
    box-shadow: 0 6px 32px rgba(0,0,0,0.6);
    min-height: 480px;
    min-width: 700px;
    max-width: 100%;
}

#quickViewModal .modal-body {
    display: flex;
    flex-direction: row;
    padding: 0;
    width: 100%;
}

/* QuickView Modal Image Container */
#quickViewImageContainer {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    max-height: 600px;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2rem;
}

#quickViewImage {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    #quickViewImageContainer {
        min-height: 300px;
        max-height: 400px;
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    #quickViewImageContainer {
        min-height: 250px;
        max-height: 350px;
    }
}

#imageLoading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10;
}

.quickview-image-container {
    flex: 0 0 360px;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    max-height: 520px;
    padding: 32px 16px 32px 32px;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

#quickViewModal .quickview-image-container img {
    width: 100%;
    height: 100%;
    max-width: 320px;
    max-height: 420px;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.5);
    background: #444;
}

#quickViewModal .quickview-details {
    flex: 1 1 0%;
    padding: 40px 40px 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 320px;
    min-height: 420px;
}

@media (max-width: 900px) {
    #quickViewModal .modal-content {
        flex-direction: column;
        min-width: 320px;
        min-height: 320px;
    }
    #quickViewModal .modal-body {
        flex-direction: column;
    }
    #quickViewModal .quickview-image-container {
        flex: 0 0 auto;
        min-height: 200px;
        max-height: 260px;
        padding: 24px 24px 0 24px;
        border-radius: 10px 10px 0 0;
    }
    #quickViewModal .quickview-details {
        padding: 24px;
        min-height: 200px;
    }
}

/* Add any other collection-specific styles here */

/* Global Styles */
body {
    background-color: #000 !important;
    color: #fff;
}

/* Product Grid Container */
#productsGrid {
    margin: 0 -5px;
    min-height: 300px; /* Ensure grid has a minimum height */
    position: relative;
    background: rgba(0, 0, 0, 0.1); /* Light background for debugging */
    padding: 20px 0;
}

/* Debug styles */
.debug-border {
    border: 1px solid red !important;
}

/* Product Card */
.product-card {
    background: #111 !important;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #333 !important;
    margin: 0;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card:hover {
    transform: translateY(-5px);
    z-index: 10;
    box-shadow: 0 5px 20px rgba(191, 163, 124, 0.3) !important;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(191, 163, 124, 0.9);
    color: #000;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 3/4) {
    .product-image-container::before {
        content: '';
        display: block;
        padding-top: 133.33%;
        float: left;
    }
    .product-image-container::after {
        content: '';
        display: block;
        clear: both;
    }
}

.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #000;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 3/4) {
    .product-image-container::before {
        content: '';
        display: block;
        padding-top: 133.33%;
        float: left;
    }
    .product-image-container::after {
        content: '';
        display: block;
        clear: both;
    }
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(191, 163, 124, 0.9);
    color: #000;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-label {
    position: absolute;
    top: 15px;
    left: 0;
    background: #bfa37c;
    color: #000;
    padding: 5px 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.product-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.product-card:hover .product-actions {
    transform: translateY(0);
}

.quick-view-btn {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: 2px solid #bfa37c;
    padding: 12px 24px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    border-radius: 30px;
    min-width: 160px;
    opacity: 0;
    transform: translateY(15px);
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.product-card:hover .quick-view-btn {
    opacity: 1;
    transform: translateY(0);
    background: #bfa37c;
    color: #000;
}

.quick-view-btn:hover {
    background: #d4b98c !important;
    border-color: #d4b98c;
    transform: translateY(-2px) !important;
}

.quick-view-btn:active {
    transform: translateY(0) !important;
}

.inquiry-btn {
    background: #bfa37c;
    color: #000;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.inquiry-btn:hover {
    background: #d4b98c;
    color: #000;
}

.spacer-navbar {
    height: 80px;
}

.collection-header {
    padding: 4rem 0 2rem;
    background-color: #000;
    margin-bottom: 0;
    border-bottom: 1px solid #222;
}

.collection-header h1 {
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.collection-header p {
    color: #bfa37c;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* Search Box */
.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    border-radius: 30px !important;
    padding: 12px 25px !important;
    height: auto !important;
}

.search-box input:focus {
    box-shadow: 0 0 0 0.25rem rgba(191, 163, 124, 0.25) !important;
    border-color: #bfa37c;
}

.search-box .btn {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    background: #bfa37c;
    color: #000;
    border: none !important;
    border-radius: 0 30px 30px 0 !important;
    padding: 0 25px !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.search-box .btn:hover {
    background: #d4b98c;
}

/* Load More Button */
#loadMoreBtn {
    background: transparent !important;
    border: 1px solid #bfa37c !important;
    color: #bfa37c !important;
    padding: 12px 40px !important;
    border-radius: 30px !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 30px auto 50px;
    display: block;
    transition: all 0.3s ease;
}

#loadMoreBtn:hover {
    background: #bfa37c !important;
    color: #000 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(191, 163, 124, 0.3);
}

#loadMoreBtn:active {
    transform: translateY(0);
}

#loadMoreBtn:focus {
    box-shadow: 0 0 0 0.25rem rgba(191, 163, 124, 0.25) !important;
    outline: none;
}

#loadMoreBtn:hover {
    background: #bfa37c !important;
    color: #000 !important;
}

/* Quick View Modal */
.modal-xl {
    max-width: 1000px !important;
}

.modal-content {
    background: #0a0a0a !important;
    border: 1px solid #bfa37c !important;
    border-radius: 0 !important;
    min-height: 70vh;
}

.modal-header {
    border-bottom: 1px solid #333;
    padding: 20px 30px;
}

.modal-title {
    color: #bfa37c !important;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 1.5rem;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
    transform: scale(1.2);
    margin-right: 5px;
}

.modal-body {
    padding: 30px;
}

.product-details h4 {
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-category, .product-industry {
    color: #bfa37c;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.product-industry {
    color: #999;
    margin-bottom: 20px;
}

.inquiry-form .form-control,
.inquiry-form .form-select {
    background-color: #1a1a1a !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    border-radius: 0 !important;
    padding: 14px 18px !important;
    margin-bottom: 15px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.inquiry-form .form-control:focus,
.inquiry-form .form-select:focus {
    border-color: #bfa37c !important;
    box-shadow: 0 0 0 0.25rem rgba(191, 163, 124, 0.25) !important;
}

.inquiry-form .form-label {
    color: #bfa37c;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inquiry-form .form-group {
    margin-bottom: 1.5rem;
}

.inquiry-form .form-group.full-width {
    grid-column: 1 / -1;
}

.inquiry-form .form-group.half-width {
    grid-column: span 1;
}

@media (max-width: 767.98px) {
    .inquiry-form .form-group.half-width {
        grid-column: 1 / -1;
    }
}

/* Removed duplicate focus styles - consolidated above */

.inquiry-form .btn-primary {
    background: #bfa37c !important;
    border: 1px solid #bfa37c !important;
    color: #000 !important;
    padding: 14px 30px !important;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.inquiry-form .btn-primary:hover {
    background: #d4b98c !important;
    border-color: #d4b98c !important;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .collection-header {
        padding: 3rem 0 1.5rem;
    }
    
    .collection-header h1 {
        font-size: 1.8rem;
    }
    
    .collection-header p {
        font-size: 1rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-card {
        margin-bottom: 15px;
    }
    
    .quick-view-btn {
        padding: 8px 15px;
        font-size: 11px;
        min-width: 140px;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        margin: 0;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .product-details h4 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .inquiry-form .btn-primary {
        padding: 10px 20px !important;
    }
    
    .product-actions {
        padding: 10px;
    }
    
    .quick-view-btn, .inquiry-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    margin: 10px 0;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 5px;
}

/* Section Padding */
.section-padding {
    padding: 2rem 0 5rem;
}

/* Container Max Width */
.container.custom-container {
    max-width: 1400px;
}

/* Search Input */
#searchInput {
    height: 50px;
    border-bottom: 2px solid #bfa37c !important;
}

/* Search Button */
#searchButton {
    background: transparent !important;
    color: #bfa37c !important;
}

/* Clear Search Button */
#clearSearch {
    background: transparent !important;
    color: #666 !important;
}

/* Search Results Count */
#search-results-count {
    color: #666;
    min-height: 24px;
}

/* Modal Styles */
#quickViewModal .modal-content {
    background: #0a0a0a !important;
    border: 1px solid #bfa37c;
    border-radius: 0 !important;
}

#quickViewModal .modal-body {
    padding: 0;
}

#quickViewImageContainer {
    position: relative;
    min-height: 500px;
}

#quickViewImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#quickViewName {
    color: #bfa37c;
    letter-spacing: 1px;
}

/* Inquiry Form Toggle Button */
#showInquiryForm {
    background: #bfa37c !important;
    border: 1px solid #bfa37c !important;
    color: #000 !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 25px !important;
    width: 100%;
    transition: all 0.3s ease;
}

#showInquiryForm:hover {
    background: #d4b98c !important;
    border-color: #d4b98c !important;
}

/* Inquiry Form Container */
.inquiry-container h5 {
    color: #bfa37c;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 1px;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #333;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

/* Form Fields */
.form-label {
    font-size: 0.75rem !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

/* Form Controls */
.form-control,
/* Form field styles */
#quickViewInquiryForm .form-control,
#quickViewInquiryForm .form-select {
    background-color: #1a1a1a !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    border-radius: 0 !important;
    margin-bottom: 1rem;
    width: auto;
    max-width: 100%;
}

/* Form row layout */
#quickViewInquiryForm .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}

/* Full width fields (name, message) */
#quickViewInquiryForm input[name*="name"],
#quickViewInquiryForm textarea,
#quickViewInquiryForm .form-group.col-12 {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 1rem;
}

/* Half width fields */
#quickViewInquiryForm .form-group.col-12.col-md-6 {
    flex: 0 0 calc(50% - 20px);
    max-width: calc(50% - 20px);
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 1rem;
}

/* Ensure form controls take full width of their container */
#quickViewInquiryForm .form-control,
#quickViewInquiryForm .form-select,
#quickViewInquiryForm textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Ensure textarea takes full width and has proper height */
#quickViewInquiryForm textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Form group spacing */
#quickViewInquiryForm .form-group {
    margin-bottom: 1.5rem;
}

/* Full width for submit button */
#quickViewInquiryForm button[type="submit"] {
    width: 100%;
    margin-top: 1rem;
}

/* Form container overflow fix */
#quickViewInquiryForm {
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
}

/* Form validation states - Reset first */
#quickViewInquiryForm .form-control,
#quickViewInquiryForm .form-select {
    background-image: none !important;
    padding-right: 2.25rem !important; /* Make room for icons */
    background-position: right 0.75rem center !important;
    background-repeat: no-repeat !important;
    background-size: 16px 12px !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Invalid state */
#quickViewInquiryForm .is-invalid,
#quickViewInquiryForm .was-validated .form-control:invalid,
#quickViewInquiryForm .was-validated .form-select:invalid {
    border-color: #dc3545 !important;
    padding-right: calc(1.5em + 0.75rem) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Valid state - only show after validation and if not empty */
#quickViewInquiryForm .was-validated .form-control:not(:placeholder-shown):valid,
#quickViewInquiryForm .was-validated .form-select:valid:not([value='']),
#quickViewInquiryForm .form-control.is-valid:not(:placeholder-shown) {
    border-color: #198754 !important;
    padding-right: calc(1.5em + 0.75rem) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Special handling for phone field */
#quickViewInquiryForm input[type="tel"] {
    background-image: none !important;
    padding-right: 1rem !important;
}

#quickViewInquiryForm input[type="tel"].is-valid,
#quickViewInquiryForm.was-validated input[type="tel"]:valid {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Dropdown styling */
#quickViewInquiryForm .form-select {
    background-color: #1a1a1a !important;
    color: #fff !important;
    border: 1px solid #333 !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23bfa37c' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    padding-right: 2.25rem !important;
    width: 100%;
}

/* Dropdown validation states */
#quickViewInquiryForm .form-select.is-invalid {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dc3545' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"),
                    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") !important;
    background-position: right 0.75rem center, right 2.25rem center !important;
    background-size: 16px 12px, 12px 12px !important;
}

#quickViewInquiryForm .form-select.is-valid {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23198754' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"),
                    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") !important;
    background-position: right 0.75rem center, right 2.25rem center !important;
    background-size: 16px 12px, 12px 12px !important;
}

/* Hide default arrow in IE10+ */
#quickViewInquiryForm .form-select::-ms-expand {
    display: none;
}

/* Remove default dropdown arrow in IE */
#quickViewInquiryForm .form-select::-ms-expand {
    display: none;
}

/* Phone input specific styles */
#quickViewInquiryForm input[type="tel"] {
    width: 100% !important;
}

/* Form message styling */
#formMessage {
    margin-top: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.25rem;
}

#formMessage.text-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
}

#formMessage.text-danger {
    color: #842029;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
}

/* Modal form specific styles */
.modal-body .form-control,
.modal-body .form-select,
.modal-body textarea {
    width: 100% !important;
}

/* Full width for form groups in modal */
.modal-body .form-group {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #quickViewInquiryForm .form-control,
    #quickViewInquiryForm .form-select,
    #quickViewInquiryForm textarea {
        font-size: 16px; /* Prevent zoom on mobile */
    }
    
    /* Stack all fields on mobile */
    #quickViewInquiryForm .form-group.col-12.col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Remove number input spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Form select styling */
.form-select {
    padding: 0.5rem 1rem !important;
    height: 45px;
    width: 100%;
    background-color: #1a1a1a !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    border-radius: 0 !important;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(191, 163, 124, 0.25) !important;
    border-color: #bfa37c !important;
}

textarea.form-control {
    height: auto !important;
    min-height: 100px;
    resize: vertical;
}

/* Form Validation - Updated for better control */
.was-validated .form-control:invalid,
.was-validated .form-select:invalid,
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Only show valid state for non-empty fields that have been validated */
.was-validated .form-control:not(:placeholder-shown):valid,
.was-validated .form-select:valid:not([value='']),
.form-control.is-valid:not(:placeholder-shown) {
    border-color: #198754 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Reset valid state for empty required fields */
.was-validated .form-control:required:valid:placeholder-shown,
.was-validated .form-select:required:valid[value=''] {
    border-color: #333 !important;
    background-image: none !important;
    padding-right: 1rem !important;
}

.invalid-feedback {
    font-size: 0.75rem;
    color: #dc3545;
    margin-top: 0.25rem;
}

/* Submit Button */
#submitInquiryBtn {
    background-color: #bfa37c;
    border: 1px solid #bfa37c;
    color: #000;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 12px 25px !important;
    transition: all 0.3s ease;
}

#submitInquiryBtn:hover {
    background-color: #d4b98c;
    border-color: #d4b98c;
}



/* Form Message */
.custom-svg-close {
    background: none;
    border: none;
    padding: 0.25rem;
    font-size: 2rem;
    color: #bfa37c;
    opacity: 1;
    z-index: 1051;
    line-height: 1;
    transition: color 0.2s;
    box-shadow: none;
}
.custom-svg-close:hover {
    color: #fff;
    opacity: 1;
}
.custom-svg-close svg {
    pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}


#quickViewFormMsg {
    font-size: 0.875rem;
    margin-top: 1rem;
}

#quickViewFormMsg.alert-success {
    color: #198754;
}

#quickViewFormMsg.alert-danger {
    color: #dc3545;
}

/* Quick View Modal Loading State */
#imageLoading {
    z-index: 10;
    display: none;
}

/* Form Submission Loading State */
.btn .btn-loader {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Accessibility Improvements */
.modal:focus {
    outline: 2px solid #bfa37c;
    outline-offset: 2px;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .collection-header {
        padding: 3rem 0 1.5rem;
    }
}

/* --- FIXED BY CHATGPT: Ensure product grid is always in grid layout --- */
/* Added at end of file: Line X (last line) */

#productsGrid, #productGrid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    width: 100% !important;
    padding: 1rem 0 !important;
    box-sizing: border-box !important;
}

.product-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    #productsGrid, #productGrid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
        gap: 1.25rem !important;
    }
}
@media (max-width: 768px) {
    #productsGrid, #productGrid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
        gap: 1rem !important;
        padding: 0.5rem 0 !important;
    }
}
@media (max-width: 480px) {
    #productsGrid, #productGrid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
}
/* --- END OF FIX --- */
