/* Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.product-image-container {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background-color: #FAF6F0;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: var(--primary);
    color: var(--bg-cream);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 12px;
    z-index: 1;
    border-left: 3px solid var(--accent);
}

.product-badge.best-seller {
    background: var(--wood-gradient);
    color: #FFF8DC;
    border-left: 3px solid var(--accent);
}

.product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(42, 22, 12, 0.8) 0%, rgba(42, 22, 12, 0) 100%);
    display: flex;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-smooth);
    z-index: 2;
}

.product-card:hover .product-overlay {
    opacity: 1;
    transform: translateY(0);
}

.overlay-btn {
    width: 44px;
    height: 44px;
    background-color: var(--bg-cream);
    color: var(--primary);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.overlay-btn:hover {
    background-color: var(--primary);
    color: var(--bg-cream);
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 6px;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-title a:hover {
    color: var(--secondary);
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.product-size {
    color: var(--text-muted);
}

.product-wood {
    background-color: rgba(74, 37, 17, 0.06);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.product-price {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--secondary);
}

.btn-card-inquiry {
    padding: 8px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: none;
    border: 1px solid var(--primary);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--transition-smooth);
}

.btn-card-inquiry:hover {
    background-color: var(--primary);
    color: var(--bg-cream);
}

/* Off-canvas Inquiry Cart Drawer */
.inquiry-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.inquiry-drawer-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.inquiry-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background-color: var(--bg-cream);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.inquiry-drawer.is-active {
    right: 0;
}

@media (max-width: 480px) {
    .inquiry-drawer {
        max-width: 100%;
    }
}

.drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-white);
}

.drawer-header h3 {
    font-size: 1.4rem;
    font-family: var(--font-heading);
}

.close-drawer-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.inquiry-items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.inquiry-item {
    display: flex;
    gap: 16px;
    background-color: var(--bg-white);
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    position: relative;
}

.inquiry-item-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background-color: var(--bg-cream);
}

.inquiry-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.inquiry-item-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.inquiry-item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.inquiry-item-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary);
    margin-top: 4px;
}

.remove-item-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.remove-item-btn:hover {
    color: red;
}

.empty-inquiry-msg {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
}

/* Inquiry form within the drawer */
.drawer-inquiry-form {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: auto;
}

.form-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.form-group {
    margin-bottom: 12px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-espresso);
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.drawer-footer {
    padding: 24px;
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background-color: var(--bg-cream);
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    max-height: 90dvh;
    border-radius: var(--radius-md);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-lg);
    position: relative;
    transform: scale(0.9);
    transition: var(--transition-smooth);
    border: 1px solid var(--accent);
}

.modal-overlay.is-active .modal-box {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: var(--bg-white);
    color: var(--primary);
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-smooth);
}

.modal-close-btn:hover {
    background-color: var(--primary);
    color: var(--bg-cream);
    transform: rotate(90deg);
}

.modal-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

@media (max-width: 768px) {
    .modal-overlay {
        padding: 16px 12px;
        align-items: flex-start;
    }
    
    .modal-box {
        max-height: 92vh;
        max-height: 92dvh;
        margin: auto 0;
    }

    .modal-content {
        grid-template-columns: 1fr;
    }

    .modal-image-pane {
        padding: 20px 16px 12px;
    }

    .modal-image-pane img {
        max-height: 220px;
        object-fit: contain;
    }

    .modal-info-pane {
        padding: 16px 20px 24px;
        max-height: none;
    }

    .modal-title {
        font-size: 1.35rem;
        margin-bottom: 8px;
    }

    .modal-price {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .modal-desc {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }

    .modal-specs {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 12px;
        margin-bottom: 16px;
    }
}

.modal-desc {
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.modal-specs {
    list-style: none;
    margin-bottom: 24px;
    padding: 16px;
    background-color: rgba(74, 37, 17, 0.04);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.modal-specs li span {
    font-weight: 700;
    color: var(--primary);
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

/* Floating Widgets */
.floating-widgets {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 99;
}

.widget-whatsapp {
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
}

.widget-whatsapp:hover {
    transform: scale(1.1) rotate(8deg);
    background-color: #128C7E;
}

.widget-whatsapp-bubble {
    position: absolute;
    right: 75px;
    top: 12px;
    background-color: var(--bg-white);
    color: var(--text-espresso);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    white-space: nowrap;
    border: 1px solid var(--border-color);
    pointer-events: none;
    opacity: 0;
    transform: translateX(10px);
    transition: var(--transition-smooth);
}

.widget-whatsapp:hover .widget-whatsapp-bubble {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .floating-widgets {
        bottom: 20px;
        right: 16px;
        gap: 12px;
    }
    .widget-whatsapp {
        width: 52px;
        height: 52px;
    }
    .widget-whatsapp-bubble {
        display: none;
    }
}

.widget-scrolltop {
    width: 48px;
    height: 48px;
    background-color: var(--primary);
    color: var(--bg-cream);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    border: 1px solid var(--accent);
}

.widget-scrolltop.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.widget-scrolltop:hover {
    background-color: var(--secondary);
    transform: translateY(-4px);
}

/* Toast notification */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1005;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 768px) {
    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 85px;
    }
}

.toast {
    background-color: var(--primary);
    color: var(--bg-cream);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition-smooth);
}

.toast.is-show {
    transform: translateY(0);
    opacity: 1;
}

.toast-message {
    font-size: 0.9rem;
    font-weight: 600;
}
