/* Product Grid */
.fo-dw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 0 0 40px;
    padding: 0;
}

/* Product Card */
.fo-dw-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 540px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fo-dw-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.fo-dw-card-image-area {
    width: 100%;
    height: 240px;
    background: #f9fafb;
    position: relative;
    overflow: hidden;
}

.fo-dw-card-image-area img.fo-dw-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.fo-dw-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.fo-dw-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.fo-dw-badge-out { 
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.fo-dw-badge-low { 
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.fo-dw-card-bottom {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fo-dw-title {
    margin: 0 0 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.fo-dw-excerpt {
    margin: 0 0 14px;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
}

.fo-dw-price {
    margin: 0 0 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.5px;
}

.fo-dw-price-unit {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
}

.fo-dw-quantity {
    margin: 0 0 4px;
    font-size: 0.875rem;
    color: #4b5563;
}

.fo-dw-quantity-label {
    font-weight: 500;
}

.fo-dw-quantity-value {
    font-weight: 700;
    color: #059669;
}

/* Enhanced Button Area */
.fo-dw-card-footer {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.fo-dw-cta-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    color: #ffffff;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.3px;
}

.fo-dw-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fo-dw-cta-btn:hover::before {
    opacity: 1;
}

.fo-dw-cta-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.fo-dw-cta-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.fo-dw-cta-green:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.fo-dw-cta-green:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.4);
}

.fo-dw-cta-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.fo-dw-cta-blue:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.fo-dw-cta-blue:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.4);
}

/* Enhanced Modal */
.fo-dw-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    animation: fadeIn 0.3s ease;
}

.fo-dw-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fo-dw-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.fo-dw-modal-content {
    position: relative;
    width: 90%;
    max-width: 580px;
    margin: 20px;
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fo-dw-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fo-dw-modal-close:hover {
    background: #ef4444;
    color: #ffffff;
    transform: rotate(90deg);
}

.fo-dw-modal-title {
    margin: 0 0 12px;
    font-size: 1.75rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.5px;
    padding-right: 50px;
}

.fo-dw-modal-subtitle {
    margin: 0 0 32px;
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.5;
}

.fo-dw-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.fo-dw-field {
    margin: 0 0 20px;
}

.fo-dw-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
}

.fo-dw-field .required {
    color: #ef4444;
    font-weight: 700;
}

.fo-dw-field input[type="text"],
.fo-dw-field input[type="email"],
.fo-dw-field input[type="tel"],
.fo-dw-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    color: #111827;
    background: #ffffff;
    transition: all 0.2s ease;
    font-family: inherit;
}

.fo-dw-field input:focus,
.fo-dw-field textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: #ffffff;
}

.fo-dw-field input::placeholder,
.fo-dw-field textarea::placeholder {
    color: #9ca3af;
}

.fo-dw-field textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Status Messages */
.fo-dw-status {
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fo-dw-status:not(:empty) {
    display: block;
}

.fo-dw-status.fo-dw-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 2px solid #6ee7b7;
}

.fo-dw-status.fo-dw-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 2px solid #fca5a5;
}

/* Enhanced Submit Button */
.fo-dw-submit-btn {
    width: 100%;
    padding: 16px 28px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.fo-dw-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fo-dw-submit-btn:hover::before {
    opacity: 1;
}

.fo-dw-submit-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.fo-dw-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.4);
}

.fo-dw-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* No Items Message */
.fo-dw-no-items {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
    font-size: 1.125rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fo-dw-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .fo-dw-modal-content {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .fo-dw-form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .fo-dw-card-footer {
        flex-direction: column;
        gap: 10px;
    }

    .fo-dw-modal-title {
        font-size: 1.5rem;
    }

    .fo-dw-cta-btn {
        padding: 12px 18px;
    }
}

@media (max-width: 480px) {
    .fo-dw-card {
        height: auto;
    }

    .fo-dw-modal-close {
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
    }

    .fo-dw-modal-content {
        padding: 28px 20px;
    }
}

/* Smooth scrollbar for modal */
.fo-dw-modal-content::-webkit-scrollbar {
    width: 8px;
}

.fo-dw-modal-content::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 10px;
}

.fo-dw-modal-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

.fo-dw-modal-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
