/*
 * Single Product Card Design
 * Modern Hostinger-style individual product display
 */

.plm-product-card-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    overflow: visible; /* Allow badges to show outside */
    box-sizing: border-box;
    padding-top: 35px; /* More space for popular choice badge */
    margin-top: 10px; /* Additional margin for better visibility */
}

.plm-product-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 40px 30px;
    text-align: center;
    position: relative;
    max-width: 380px;
    margin: 0 auto 20px auto; /* Remove top margin since container has padding */
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
    overflow: hidden; /* Prevent content from overflowing */
    word-wrap: break-word; /* Handle long text */
}

.plm-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    border-color: #673ab7;
}

.plm-product-card.featured {
    border-color: #673ab7;
    background: linear-gradient(135deg, #ffffff 0%, #f8f4ff 100%);
}

.plm-product-card.featured::before {
    content: "Popular Choice";
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #673ab7, #9c27b0);
    color: white;
    padding: 8px 24px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(103, 58, 183, 0.3);
    z-index: 2;
    white-space: nowrap;
    max-width: calc(100% - 40px);
    text-align: center;
}

/* Discount Badge (Hostinger Style) */
.plm-discount-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    z-index: 3;
    min-width: 50px;
    text-align: center;
}

/* Product Image Section */
.plm-product-image-section {
    text-align: center;
    margin-bottom: 25px;
}

.plm-product-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #673ab7, #9c27b0);
    border-radius: 16px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.plm-product-image {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.plm-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Product Information */
.plm-product-info {
    margin: 25px 0;
}

.plm-product-title {
    font-size: 24px;
    font-weight: 800;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.plm-product-subtitle {
    font-size: 15px;
    color: #7f8c8d;
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

/* Pricing Section */
.plm-product-pricing {
    margin: 25px 0;
    text-align: center;
}

.plm-price-main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.plm-price-currency {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.plm-price-amount {
    font-size: 36px;
    font-weight: 900;
    color: #2c3e50;
    line-height: 1;
}

.plm-price-period {
    font-size: 16px;
    color: #7f8c8d;
    font-weight: 600;
}

.plm-price-original-inline {
    font-size: 16px;
    color: #95a5a6;
    text-decoration: line-through;
    margin-left: 8px;
}


.plm-pricing-terms {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.4;
    margin-top: 8px;
}

/* Specifications Grid */
.plm-specs-section {
    margin: 30px 0;
}

.plm-specs-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
}

.plm-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.plm-spec-item {
    text-align: center;
}

.plm-spec-icon {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.plm-spec-value {
    font-size: 24px;
    font-weight: 800;
    color: #2c3e50;
    display: block;
    line-height: 1;
}

.plm-spec-label {
    font-size: 13px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 6px;
    font-weight: 600;
}

/* Product Description */
.plm-description-section {
    margin: 25px 0;
    text-align: left;
}

.plm-description-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.plm-description-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plm-description-list li {
    padding: 6px 0;
    font-size: 14px;
    color: #34495e;
    font-weight: 500;
    line-height: 1.4;
}

/* Description After Button (Hostinger Style) */
.plm-description-after-button {
    margin: 20px 0 0 0;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
    text-align: left;
}

.plm-description-after-button .plm-description-list {
    margin: 0;
}

.plm-description-after-button .plm-description-list li {
    padding: 4px 0;
    font-size: 13px;
    color: #27ae60;
    font-weight: 500;
    line-height: 1.3;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.plm-description-after-button .plm-description-list li::before {
    content: none;
}

/* Action Button */
.plm-product-action {
    margin-top: 35px;
    padding: 0 10px; /* Add padding to prevent button from touching edges */
}

.plm-action-button {
    background: linear-gradient(135deg, #673ab7, #9c27b0);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    width: calc(100% - 20px); /* Ensure button doesn't overflow */
    max-width: 300px; /* Set maximum width */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 16px rgba(103, 58, 183, 0.3);
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.2;
}

.plm-action-button:hover {
    background: linear-gradient(135deg, #5e35b1, #8e24aa);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(103, 58, 183, 0.4);
    color: white;
    text-decoration: none;
}

.plm-action-button:active {
    transform: translateY(0);
}

/* Additional Info */
.plm-product-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.plm-guarantee {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.plm-support-info {
    font-size: 13px;
    color: #27ae60;
    font-weight: 600;
}

/* Preview Modal */
.plm-preview-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.plm-preview-modal-content {
    background-color: #fefefe;
    margin: 3% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.plm-preview-modal-header {
    background: linear-gradient(135deg, #673ab7, #9c27b0);
    color: white;
    padding: 20px 30px;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.plm-preview-modal-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.plm-preview-modal-close {
    color: white;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.plm-preview-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.plm-preview-modal-body {
    padding: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .plm-product-card-container {
        padding-top: 30px; /* Adjust for smaller screens */
        padding-left: 15px;
        padding-right: 15px;
        margin-top: 5px;
    }
    
    .plm-product-card {
        margin: 0 0 20px 0;
        padding: 30px 20px;
        max-width: calc(100vw - 30px); /* Ensure card doesn't overflow viewport */
    }
    
    .plm-product-card.featured::before {
        font-size: 12px;
        padding: 6px 18px;
        top: -3px;
    }
    
    .plm-product-title {
        font-size: 22px;
    }
    
    .plm-price-amount {
        font-size: 42px;
    }
    
    .plm-specs-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }
    
    .plm-product-action {
        padding: 0 5px;
    }
    
    .plm-action-button {
        width: calc(100% - 10px);
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .plm-preview-modal-content {
        width: 95%;
        margin: 5% auto;
    }
}

@media (max-width: 480px) {
    .plm-product-card-container {
        padding-top: 25px; /* Adjust for mobile */
        padding-left: 10px;
        padding-right: 10px;
        margin-top: 5px;
    }
    
    .plm-product-card {
        margin: 0 0 15px 0;
        padding: 25px 15px;
        max-width: calc(100vw - 20px);
    }
    
    .plm-product-card.featured::before {
        font-size: 11px;
        padding: 5px 15px;
        top: -2px;
        max-width: calc(100% - 20px);
    }
    
    .plm-product-title {
        font-size: 20px;
    }
    
    .plm-price-amount {
        font-size: 36px;
    }
    
    .plm-action-button {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .plm-specs-grid {
        padding: 15px;
    }
    
    .plm-discount-badge {
        top: 15px;
        right: 15px;
        padding: 6px 10px;
        font-size: 14px;
    }
}

/* Color Variations */
.plm-product-card.blue .plm-product-icon,
.plm-product-card.blue .plm-action-button {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.plm-product-card.blue .plm-discount-badge {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.plm-product-card.green .plm-product-icon,
.plm-product-card.green .plm-action-button {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.plm-product-card.green .plm-discount-badge {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.plm-product-card.orange .plm-product-icon,
.plm-product-card.orange .plm-action-button {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.plm-product-card.orange .plm-discount-badge {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.plm-product-card.red .plm-product-icon,
.plm-product-card.red .plm-action-button {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.plm-product-card.red .plm-discount-badge {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}