.pd-products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin: 30px 0;
    padding: 0 15px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

.pd-product-item {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(74, 187, 211, 0.08), 0 3px 10px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(74, 187, 211, 0.1);
    position: relative;
    overflow: hidden;
    width: 320px;
    justify-self: center;
}

.pd-product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4ABBD3, #5BC5DD, #6BCFE7);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.pd-product-item:hover::before {
    transform: scaleX(1);
}

.pd-product-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(74, 187, 211, 0.15), 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: rgba(74, 187, 211, 0.2);
}

.pd-product-image {
    text-align: center;
    margin-bottom: 20px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.pd-product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.pd-product-item:hover .pd-product-image img {
    transform: scale(1.05);
}

.pd-product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pd-product-title {
    font-size: 1.4em;
    font-weight: 500;
    margin: 0 0 5px 0;
    color: #1a202c;
    line-height: 1.3;
    min-height: 3.6em;
    display: flex;
    align-items: flex-start;
}

.pd-product-excerpt {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    font-size: 1.05em;
    font-weight: 400;
}

.pd-product-unit {
    background: linear-gradient(135deg, #4ABBD3, #5BC5DD);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 8px 0;
    border-bottom: 2px solid rgba(74, 187, 211, 0.1);
    font-size: 1.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pd-product-unit::before {
    content: "📐";
    font-size: 16px;
}

.pd-unit-value {
    font-weight: 700;
}

.pd-unit-value sup {
    font-size: 0.65em;
    vertical-align: super;
    line-height: 0;
    position: relative;
    top: -0.2em;
    margin-left: -1px;
    font-weight: 600;
}

.pd-product-actions {
    margin-top: auto;
}

.pd-btn {
    display: inline-block;
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    text-align: center;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.pd-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.pd-btn:hover::before {
    left: 100%;
}

.pd-btn-buy {
    background: linear-gradient(135deg, #4ABBD3, #3BA8C0);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 187, 211, 0.3);
}

.pd-btn-buy:hover {
    background: linear-gradient(135deg, #3BA8C0, #2A96AD);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 187, 211, 0.4);
}

.pd-btn-quote {
    background: linear-gradient(135deg, #4ABBD3, #3BA8C0);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 187, 211, 0.3);
}

.pd-btn-quote:hover {
    background: linear-gradient(135deg, #3BA8C0, #2A96AD);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 187, 211, 0.4);
}

/* Popup stiilid */
.pd-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.pd-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    padding: 35px;
    border-radius: 20px;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px rgba(74, 187, 211, 0.15);
    border: 1px solid rgba(74, 187, 211, 0.1);
}

.pd-popup-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #64748b;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(74, 187, 211, 0.1);
}

.pd-popup-close:hover {
    color: #4ABBD3;
    background: rgba(74, 187, 211, 0.2);
    transform: rotate(90deg);
}

#pd-popup-title {
    color: #1a202c;
    font-weight: 700;
    margin-bottom: 25px;
    font-size: 1.4em;
    background: linear-gradient(135deg, #4ABBD3, #5BC5DD);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pd-form-group {
    margin-bottom: 25px;
}

.pd-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95em;
}

.pd-form-group input,
.pd-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-size: 1rem;
    background: #ffffff;
    color: #2d3748;
}

.pd-form-group input:focus,
.pd-form-group textarea:focus {
    outline: none;
    border-color: #4ABBD3;
    box-shadow: 0 0 0 3px rgba(74, 187, 211, 0.1);
    background: #fefefe;
}

.pd-btn-submit {
    background: linear-gradient(135deg, #4ABBD3, #3BA8C0);
    color: white;
    width: 100%;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pd-btn-submit:hover {
    background: linear-gradient(135deg, #3BA8C0, #2A96AD);
    transform: translateY(-2px);
}

/* Alternatiivne lahendus ülaindeksiks */
.pd-unit-superscript {
    position: relative;
    display: inline-block;
}

.pd-unit-superscript::after {
    content: "2";
    position: absolute;
    top: -0.4em;
    right: -0.7em;
    font-size: 0.55em;
    line-height: 1;
    font-weight: 600;
}

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

@keyframes slideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
        scale: 0.9;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
        scale: 1;
    }
}

/* Mobiili stiilid */
@media (max-width: 768px) {
    .pd-products-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 5px;
        margin: 20px 0;
    }

    .pd-product-item {
        padding: 20px;
        margin: 0 5px;
        width: auto;
    }

    .pd-product-excerpt {
        font-size: 1.1em;
        line-height: 1.7;
    }

    .pd-product-title {
        font-size: 1.3em;
        min-height: 3.2em;
        margin: 0 0 3px 0;
    }

    .pd-product-image {
        height: 180px;
    }

    .pd-popup-content {
        margin: 15px;
        width: calc(100% - 30px);
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .pd-products-container {
        padding: 0 2px;
        gap: 15px;
    }

    .pd-product-item {
        padding: 18px;
        margin: 0 3px;
    }

    .pd-product-excerpt {
        font-size: 1.15em;
        line-height: 1.8;
    }

    .pd-product-title {
        font-size: 1.25em;
        min-height: 3em;
        margin: 0 0 2px 0;
    }

    .pd-product-image {
        height: 160px;
    }

    .pd-btn {
        padding: 12px 24px;
        font-size: 0.95em;
    }

    .pd-popup-content {
        margin: 10px;
        width: calc(100% - 20px);
        padding: 20px;
    }

    .pd-form-group input,
    .pd-form-group textarea {
        padding: 12px 14px;
    }
}
