/* Customer Shop Products - Premium Grid Layout */

.products-grid-portal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.product-card-portal {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
}

.product-card-portal:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(30, 58, 138, 0.12);
    border-color: #bfdbfe;
}

/* Card Header (Tags) */
.shop-tag-stock {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.4rem 0.8rem;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.tag-in-stock { background: #dcfce7; color: #166534; }
.tag-out-stock { background: #fee2e2; color: #991b1b; }

/* Product Image */
.shop-img-wrapper {
    height: 180px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: #f8fafc;
    border-radius: 18px;
    transition: background 0.3s ease;
}

.product-card-portal:hover .shop-img-wrapper {
    background: #eff6ff;
}

.shop-img-wrapper img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.05));
}

.product-card-portal:hover .shop-img-wrapper img {
    transform: scale(1.1) rotate(2deg);
}

/* Product Info */
.shop-info {
    text-align: center;
    flex-grow: 1;
}

.shop-brand {
    font-size: 0.75rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    display: block;
}

.shop-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.btn-view-details {
    width: 100%;
    background: #eff6ff;
    color: #1e40af;
    border: 1.5px solid #dbeafe;
    border-radius: 14px;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-view-details:hover {
    background: #1e40af;
    color: #ffffff;
    border-color: #1e40af;
}

/* MODAL STYLES */
.product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    justify-items: center;
    z-index: 10001;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.product-modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 1000px;
    max-height: 85vh;
    border-radius: 32px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.product-modal-overlay.active .product-modal-container {
    transform: translateY(0);
}

.btn-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: #f1f5f9;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    z-index: 10;
    transition: all 0.2s;
}

.btn-modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

.modal-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

@media (max-width: 768px) {
    .modal-content-grid {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 1.5rem;
    }
}

.modal-img-box {
    background: #f8fafc;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    height: 100%;
    min-height: 400px;
}

.modal-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: hidden;
}

.modal-category {
    font-size: 0.8rem;
    font-weight: 800;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.modal-name {
    font-size: 2rem;
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.modal-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 2rem;
}

.modal-desc {
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modal-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.spec-item {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.spec-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.spec-value {
    font-weight: 700;
    color: #1e3a8a;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.modal-qty-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.modal-qty-row label {
    font-weight: 700;
    color: #1e3a8a;
    font-size: 0.9rem;
}

.modal-qty-input {
    width: 80px;
    padding: 0.6rem;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    text-align: center;
    font-weight: 700;
}

.btn-modal-buy {
    background: #1e3a8a;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal-buy:hover:not(:disabled) {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(30, 58, 138, 0.2);
}

.btn-modal-cart {
    background: white;
    color: #1e3a8a;
    border: 2px solid #1e3a8a;
    padding: 1rem;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-modal-cart:hover:not(:disabled) {
    background: #eff6ff;
}

.btn-modal-buy:disabled, .btn-modal-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

