/* PTW Frontend Styles */
:root {
    --ptw-primary: #25d366;
    /* WhatsApp Green */
    --ptw-primary-dark: #128c7e;
    --ptw-bg: #ffffff;
    --ptw-text: #333333;
    --ptw-text-light: #666666;
    --ptw-radius: 12px;
    --ptw-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --ptw-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Filter Bar */
.ptw-filter-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
    padding: 0 10px;
}

.ptw-filter-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ptw-filter-item label {
    font-weight: 600;
    color: var(--ptw-text);
}

.ptw-sort-select {
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    outline: none;
    font-size: 0.95rem;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: var(--ptw-transition);
}

.ptw-sort-select:focus {
    border-color: var(--ptw-primary);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.ptw-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.ptw-product-card {
    background: var(--ptw-bg);
    border-radius: var(--ptw-radius);
    overflow: hidden;
    box-shadow: var(--ptw-shadow);
    transition: var(--ptw-transition);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.ptw-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.ptw-product-image {
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: #f9f9f9;
}

.ptw-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--ptw-transition);
}

.ptw-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--ptw-transition);
    backdrop-filter: blur(2px);
}

.ptw-product-card:hover .ptw-overlay {
    opacity: 1;
}

.ptw-view-details {
    padding: 10px 20px;
    background: #fff;
    color: #333;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: var(--ptw-transition);
}

.ptw-product-card:hover .ptw-view-details {
    transform: scale(1);
}

.ptw-product-info {
    padding: 16px;
    text-align: center;
}

.ptw-product-info h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: var(--ptw-text);
    font-weight: 700;
}

.ptw-price {
    font-weight: 700;
    color: var(--ptw-primary-dark);
    margin: 0 0 12px;
    font-size: 1rem;
}

.ptw-modal-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ptw-primary-dark);
    margin: 10px 0 20px;
}

.ptw-order-btn {
    width: 100%;
    padding: 10px;
    background: var(--ptw-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--ptw-transition);
}

.ptw-order-btn:hover {
    background: var(--ptw-primary-dark);
}

/* Modal Styles */
.ptw-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.ptw-modal-content {
    background-color: #fff;
    margin: 3% auto;
    padding: 0;
    border-radius: 24px;
    width: 90%;
    max-width: 800px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: ptw-slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes ptw-slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ptw-close {
    position: absolute;
    right: 25px;
    top: 20px;
    color: #333;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 20;
    line-height: 1;
    background: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.ptw-modal-inner.vertical {
    display: flex;
    flex-direction: column;
}

.ptw-modal-gallery {
    width: 100%;
    background: #fdfdfd;
    padding: 40px 40px 0;
}

.ptw-main-image-wrap {
    width: 100%;
    max-height: 500px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.ptw-main-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.ptw-gallery-thumbs {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0 25px;
    scrollbar-width: thin;
}

.ptw-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--ptw-transition);
    flex-shrink: 0;
}

.ptw-thumb.active {
    border-color: var(--ptw-primary);
}

.ptw-modal-details {
    padding: 0 40px 50px;
    text-align: center;
}

.ptw-modal-details h2 {
    margin: 0 0 10px;
    font-size: 2.5rem;
    color: var(--ptw-text);
    font-weight: 800;
}

.ptw-modal-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ptw-primary-dark);
    margin: 0 0 25px;
}

.ptw-description {
    margin: 0 0 40px;
    color: var(--ptw-text-light);
    line-height: 1.8;
    font-size: 1.05rem;
}

.ptw-order-btn-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 400px;
    padding: 18px 30px;
    background: var(--ptw-primary);
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: 700;
    transition: var(--ptw-transition);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}

.ptw-order-btn-large:hover {
    background: var(--ptw-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.3);
}

.ptw-order-btn-large .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}