/* ============================================
   ADVANCED PRODUCT LANDING PAGES - COMPLETE CSS
   Version: 2.2 Final with Product Summary
============================================ */

/* ========================================
   MULTIPLE PRODUCTS GRID
======================================== */

.aplp-products-info-multi {
    margin-bottom: 40px;
}

.aplp-products-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 30px;
    color: #2c3e50;
}

.aplp-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.aplp-product-card {
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.aplp-product-card:hover {
      border-color: #e3bc9a;
    transform: translateY(-4px);
}

.aplp-product-card-image {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.aplp-product-card-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.aplp-product-card:hover .aplp-product-card-image img {
    transform: scale(1.05);
}

.aplp-product-card-image .aplp-sale-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.aplp-product-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.aplp-product-card-content h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    color: #2c3e50;
    line-height: 1.3;
}

.aplp-product-card-price {
    margin: 10px 0;
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
}

.aplp-product-card-price del {
    color: #999;
    font-size: 18px;
    margin-right: 8px;
}

.aplp-product-card-price ins {
    text-decoration: none;
}

.aplp-product-card-desc {
    margin: 12px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
}

.aplp-product-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.aplp-meta-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 500;
}

.aplp-meta-badge.stock {
    background: #d4edda;
    color: #155724;
}

/* ========================================
   SINGLE PRODUCT INFO (Legacy Support)
======================================== */

.aplp-product-info {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.aplp-product-header {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.aplp-product-image {
    flex: 0 0 250px;
}

.aplp-product-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.aplp-product-details {
    flex: 1;
}

.aplp-product-title {
    margin: 0 0 15px 0;
    font-size: 28px;
    color: #333;
    line-height: 1.3;
}

.aplp-product-price {
    margin: 15px 0;
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
}

.aplp-product-price del {
    color: #999;
    font-size: 24px;
    margin-right: 10px;
}

.aplp-product-price ins {
    text-decoration: none;
    color: #e74c3c;
}

.aplp-sale-badge {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.aplp-product-short-desc {
    margin: 20px 0;
    color: #666;
    line-height: 1.7;
    font-size: 15px;
}

.aplp-stock-status {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
}

.aplp-stock-status.in-stock {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.aplp-stock-status.out-of-stock {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ========================================
   CHECKOUT SECTIONS
======================================== */

.aplp-checkout-section {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 40px;
    margin: 30px 0;
}

.aplp-section-title {
    margin: 0 0 25px 0;
    font-size: 24px;
    color: #2c3e50;
    border-bottom: 3px solid #e3bc9a;
    padding-bottom: 10px;
}

/* ========================================
   PRODUCT SUMMARY BOXES - ALL STYLES
======================================== */

/* 1. FULL CHECKOUT - Purple Summary Box */
.aplp-checkout-product-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    animation: summaryFadeIn 0.5s ease-out;
}

.aplp-summary-header {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.aplp-summary-products {
    margin-bottom: 20px;
}

.aplp-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    animation: itemSlideIn 0.3s ease-out;
    transition: all 0.3s ease;
}

.aplp-summary-item:last-child {
    border-bottom: none;
}

.aplp-summary-item:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 6px;
}

.aplp-summary-name {
    font-size: 15px;
    flex: 1;
}

.aplp-summary-price {
    font-weight: 600;
    font-size: 15px;
}

.aplp-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.4);
    margin-top: 10px;
}

.aplp-summary-total-label {
    font-size: 16px;
    font-weight: 600;
}

.aplp-summary-total-amount {
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 2. MINIMAL CHECKOUT - Soft Gradient Summary Box */
.aplp-mini-product-summary {
    background: linear-gradient(135deg, #ffffff 0%, #e3bc9a 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 8px 25px rgb(227 188 154 / 41%);
    animation: summaryFadeIn 0.5s ease-out;
}

.aplp-mini-summary-header {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aplp-mini-products-list {
    margin-bottom: 15px;
}

.aplp-mini-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: #2c3e50;
    animation: itemSlideIn 0.3s ease-out;
    transition: all 0.3s ease;
}

.aplp-mini-product-item:hover {
        background: rgb(255 255 255 / 10%);
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 6px;
}

.aplp-mini-product-name {
    font-size: 14px;
    flex: 1;
    display: flex;
    align-items: center;
}

.aplp-mini-product-bullet {
    margin-right: 8px;
    font-size: 18px;
    color: #000000;
}

.aplp-mini-product-price {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
}

.aplp-mini-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    margin-top: 15px;
       border-top: 2px solid rgb(0 0 0 / 30%);
}

.aplp-mini-total-label {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.aplp-mini-total-price {
    font-size: 24px;
    font-weight: bold;
    color: black;
}

/* 3. BUTTON CHECKOUT - Green Summary Box */
.aplp-button-product-summary {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(132, 250, 176, 0.4);
    animation: summaryFadeIn 0.5s ease-out;
}

.aplp-button-summary-header {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 18px;
    text-align: center;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aplp-button-products-list {
    margin-bottom: 18px;
}

.aplp-button-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: #2c3e50;
    animation: itemSlideIn 0.3s ease-out;
    transition: all 0.3s ease;
}

.aplp-button-product-item:hover {
    background: rgba(46, 204, 113, 0.1);
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 6px;
}

.aplp-button-product-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.aplp-button-product-check {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #2ecc71;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    margin-right: 10px;
    flex-shrink: 0;
}

.aplp-button-product-name {
    font-size: 14px;
}

.aplp-button-product-price {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
}

.aplp-button-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 2px solid rgba(46, 204, 113, 0.3);
}

.aplp-button-total-label {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.aplp-button-total-price {
    font-size: 24px;
    font-weight: bold;
    color: #2ecc71;
}

/* ========================================
   FORM STYLES
======================================== */

.aplp-form {
    max-width: 100%;
}

.aplp-form-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
}

.aplp-form-section h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.aplp-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.aplp-form-field {
    margin-bottom: 20px;
}

.aplp-form-field.half {
    flex: 1;
}

.aplp-form-field label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.aplp-form-field label .required {
    color: #e74c3c;
}

.aplp-form-field input[type="text"],
.aplp-form-field input[type="email"],
.aplp-form-field input[type="tel"],
.aplp-form-field textarea,
.aplp-form-field select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.aplp-form-field input:focus,
.aplp-form-field textarea:focus,
.aplp-form-field select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.aplp-form-field textarea {
    resize: vertical;
    font-family: inherit;
}

/* ========================================
   ORDER SUMMARY (Legacy - Keep for compatibility)
======================================== */

.aplp-order-summary {
    background: white;
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.aplp-order-summary h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
}

.aplp-order-summary table {
    width: 100%;
    border-collapse: collapse;
}

.aplp-order-summary table tr {
    border-bottom: 1px solid #f0f0f0;
}

.aplp-order-summary table tr:last-child {
    border-bottom: none;
}

.aplp-order-summary table tr.total-row {
    border-top: 2px solid #3498db;
    background: #f8f9fa;
}

.aplp-order-summary table td {
    padding: 12px 0;
}

.aplp-order-summary table td:last-child {
    text-align: right;
}

.aplp-total-price {
    color: #e74c3c;
    font-size: 20px;
}

/* Total Summary (Legacy) */
.aplp-total-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.aplp-total-summary table {
    width: 100%;
    border-collapse: collapse;
}

.aplp-total-summary table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.aplp-total-summary table tr:last-child {
    border-bottom: none;
}

.aplp-total-summary table tr.total-row {
    border-top: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.aplp-total-summary table td {
    padding: 12px 0;
    font-size: 15px;
}

.aplp-total-summary table td:last-child {
    text-align: right;
}

.aplp-total-summary table .total-row td {
    padding: 16px 0;
    font-size: 20px;
}

.aplp-total-summary .price,
.aplp-total-summary .total-price {
    font-weight: 600;
}

/* ========================================
   SUBMIT BUTTON
======================================== */

.aplp-form-actions {
    text-align: center;
    margin-top: 25px;
}

.aplp-submit-btn {
        background: linear-gradient(135deg, #e3bc9a, #e3bc9a);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 500px;
    position: relative;
}

.aplp-submit-btn:hover {
    background: linear-gradient(135deg, #000000, #000000);
    transform: translateY(-2px);
}

.aplp-submit-btn:active {
    transform: translateY(0);
}

.aplp-submit-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.aplp-submit-btn.minimal {
    padding: 15px 40px;
    font-size: 16px;
}

.aplp-submit-btn.button-style {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.aplp-submit-btn.button-style:hover {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.aplp-secure-note {
    margin-top: 15px;
    color: #666;
    font-size: 13px;
}

/* ========================================
   MINIMAL CHECKOUT
======================================== */

.minimal-checkout {
    margin: 30px auto;
    padding: 40px;
}

.aplp-checkout-description {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 25px;
    padding: 12px;
    background: #ffffff;
    border-left: 4px solid #e3bc9a;
    border-radius: 4px;
}

.aplp-minimal-fields {
    margin-bottom: 20px;
}

.minimal-checkout .aplp-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

.minimal-checkout .aplp-form-field {
    margin-bottom: 20px;
    text-align: left;
}

.minimal-checkout .aplp-form-field.half {
    flex: 1;
}

.minimal-checkout .aplp-form-field label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.minimal-checkout .aplp-form-field label .required {
    color: #e74c3c;
}

.minimal-checkout .aplp-form-field input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.minimal-checkout .aplp-form-field input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.minimal-checkout .aplp-submit-btn {
    width: 100%;
    max-width: 100%;
    padding: 16px 40px;
    font-size: 17px;
    margin-bottom: 15px;
}

.minimal-checkout .aplp-note {
    text-align: center;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 5px;
    padding: 15px;
    margin-top: 20px;
    color: #856404;
    font-size: 13px;
    line-height: 1.6;
}

.minimal-checkout .aplp-note strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.minimal-checkout .aplp-checkout-messages {
    margin-top: 15px;
}

.minimal-checkout .aplp-checkout-messages .success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 15px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
}

.minimal-checkout .aplp-checkout-messages .error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
}

/* ========================================
   BUTTON CHECKOUT
======================================== */

.button-checkout {
    max-width: 500px;
    margin: 30px auto;
    text-align: center;
    padding: 30px;
}

/* ========================================
   MESSAGES
======================================== */

.aplp-note {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 15px;
}

.aplp-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

#aplp-checkout-messages {
    margin-top: 20px;
}

#aplp-checkout-messages .success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
}

#aplp-checkout-messages .error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
}

/* ========================================
   LOADING STATE
======================================== */

.aplp-submit-btn .btn-loading {
    display: none;
}

.aplp-submit-btn.loading .btn-text {
    display: none;
}

.aplp-submit-btn.loading .btn-loading {
    display: inline;
}

/* ========================================
   ANIMATIONS
======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes summaryFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes itemSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.aplp-checkout-wrapper {
    animation: fadeIn 0.5s ease-out;
}

.aplp-product-card {
    animation: slideIn 0.4s ease-out;
}

.aplp-product-card:nth-child(1) { animation-delay: 0.1s; }
.aplp-product-card:nth-child(2) { animation-delay: 0.2s; }
.aplp-product-card:nth-child(3) { animation-delay: 0.3s; }
.aplp-product-card:nth-child(4) { animation-delay: 0.4s; }

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 768px) {
    .aplp-products-grid {
        grid-template-columns: 1fr;
    }
    
    .aplp-products-title {
        font-size: 24px;
    }
    
    .aplp-product-card-image img {
        height: 200px;
    }
    
    .aplp-product-header {
        flex-direction: column;
    }
    
    .aplp-product-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .aplp-product-title {
        font-size: 22px;
    }
    
    .aplp-product-price {
        font-size: 26px;
    }
    
    .aplp-checkout-section {
        padding: 20px;
    }
    
    .aplp-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .aplp-form-field.half {
        width: 100%;
    }
    
    .aplp-submit-btn {
        padding: 15px 30px;
        font-size: 16px;
    }
    
    .aplp-section-title {
        font-size: 20px;
    }
    
    .aplp-total-summary {
        padding: 20px;
    }
    
    .minimal-checkout {
        padding: 25px 20px;
    }
    
    .minimal-checkout .aplp-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    /* Summary boxes responsive */
    .aplp-checkout-product-summary,
    .aplp-mini-product-summary,
    .aplp-button-product-summary {
        padding: 20px;
    }
    
    .aplp-summary-total-amount {
        font-size: 24px;
    }
    
    .aplp-mini-total-price,
    .aplp-button-total-price {
        font-size: 20px;
    }
    
    .aplp-summary-name,
    .aplp-mini-product-name,
    .aplp-button-product-name {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .aplp-product-info {
        padding: 20px;
    }
    
    .aplp-product-title {
        font-size: 20px;
    }
    
    .aplp-product-price {
        font-size: 24px;
    }
    
    .aplp-form-section {
        padding: 15px;
    }
    
    .aplp-product-card-content h3 {
        font-size: 18px;
    }
    
    .aplp-product-card-price {
        font-size: 20px;
    }
    
    .minimal-checkout {
        padding: 20px 15px;
    }
    
    /* Summary boxes mobile */
    .aplp-checkout-product-summary,
    .aplp-mini-product-summary,
    .aplp-button-product-summary {
        padding: 15px;
    }
    
    .aplp-summary-total-amount {
        font-size: 20px;
    }
    
    .aplp-mini-total-price,
    .aplp-button-total-price {
        font-size: 18px;
    }
    
    .aplp-summary-header,
    .aplp-mini-summary-header,
    .aplp-button-summary-header {
        font-size: 13px;
    }
    
    .aplp-summary-item,
    .aplp-mini-product-item,
    .aplp-button-product-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* ========================================
   PRINT STYLES
======================================== */

@media print {
    .aplp-submit-btn,
    .aplp-form-actions {
        display: none;
    }
    
    .aplp-product-card {
        break-inside: avoid;
    }
}