/* Cart Container */
.plm-cart-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.plm-cart-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* Cart Title */
.plm-cart-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.plm-cart-count-wrapper {
    font-size: 16px;
    color: #666;
    font-weight: normal;
}

/* Cart Table */
.plm-cart {
    width: 100%;
    border-collapse: collapse;
}

/* Cart Header */
.plm-cart-header {
    display: grid;
    grid-template-columns: 32em 13em 8em 12em 18em auto;
    padding: 15px 0;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    color: #4b5563;
}

.plm-cart-header > div {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Cart Items */
.plm-cart-items {
    margin: 0;
    padding: 0;
}

.plm-cart-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

/* Product Info */
.plm-cart-item-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

.plm-product-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    background: #f3f4f6;
}

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

.plm-product-title {
    font-weight: 500;
    color: #1a1a1a;
    font-size: 16px;
}

/* Plan Name */
.plm-cart-item-plan {
    color: #4b5563;
    font-size: 14px;
}

/* Price */
.plm-cart-item-price {
    color: #1a1a1a;
    font-weight: 500;
}

.plm-regular-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 14px;
    display: block;
}

.plm-sale-price {
    color: #059669;
}

/* Quantity Controls */
.plm-quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}

.plm-quantity-button {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: #4b5563;
    transition: all 0.2s;
}

.plm-quantity-button:hover:not(:disabled) {
    background: #f3f4f6;
    color: #1a1a1a;
}

.plm-quantity-button:disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

.plm-quantity-input {
    width: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    font-size: 14px;
    color: #1a1a1a;
    padding: 8px 0;
}

/* Subtotal */
.plm-cart-item-subtotal {
    font-weight: 500;
    color: #1a1a1a;
}

/* Remove Button */
.plm-remove-from-cart {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #ef4444;
    font-size: 14px;
    transition: all 0.2s;
    border-radius: 4px;
}

.plm-remove-from-cart:hover {
    background: #fef2f2;
}

/* Cart Summary */
.plm-cart-summary {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.plm-cart-summary-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.plm-cart-summary-label {
    color: #4b5563;
    font-size: 16px;
}

.plm-cart-summary-value {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 16px;
    min-width: 100px;
    text-align: right;
}

/* Checkout Form */
.plm-checkout-form {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
}

/* Terms Section */
.plm-terms-section {
    width: 100%;
    text-align: right;
}

.plm-terms-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4b5563;
}

.plm-terms-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.plm-terms-label a {
    color: #2563eb;
    text-decoration: none;
}

.plm-terms-label a:hover {
    text-decoration: underline;
}

/* Checkout Button */
.plm-checkout-button {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 200px;
}

.plm-checkout-button:hover:not(:disabled) {
    background: #1d4ed8;
}

.plm-checkout-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Empty Cart */
.plm-cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.plm-empty-cart-message {
    color: #4b5563;
    font-size: 18px;
    margin-bottom: 20px;
}

/* Loading Overlay */
#plm-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.plm-loader {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .plm-cart-wrapper {
        padding: 20px;
    }

    .plm-cart-container {
        padding: 20px;
    }

    .plm-cart-header {
        display: none;
    }

    .plm-cart-item {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px 0;
        position: relative;
    }

    .plm-cart-item-product {
        grid-column: 1 / -1;
    }

    .plm-mobile-label {
        display: block;
        font-weight: 500;
        color: #4b5563;
        margin-bottom: 5px;
    }

    .plm-cart-item-plan,
    .plm-cart-item-price,
    .plm-cart-item-quantity,
    .plm-cart-item-subtotal {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .plm-remove-from-cart {
        position: absolute;
        top: 20px;
        right: 0;
    }

    .plm-cart-summary-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .plm-cart-summary-value {
        text-align: left;
    }

    .plm-checkout-form {
        align-items: stretch;
    }

    .plm-terms-section {
        text-align: left;
    }

    .plm-checkout-button {
        width: 100%;
    }
}

/* Lightbox */
.plm-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.plm-lightbox.active {
    opacity: 1;
}

.plm-lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.plm-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: background 0.2s;
}

.plm-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.plm-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    transition: background 0.2s;
}

.plm-lightbox-prev {
    left: 20px;
    border-radius: 0 30px 30px 0;
}

.plm-lightbox-next {
    right: 20px;
    border-radius: 30px 0 0 30px;
}

.plm-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Screenshots Grid */
.plm-screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.plm-screenshot {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    aspect-ratio: 16/9;
}

.plm-screenshot:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.plm-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile Styles for Screenshots */
@media (max-width: 768px) {
    .plm-screenshots-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .plm-lightbox-nav {
        width: 30px;
        height: 50px;
    }

    .plm-lightbox-close {
        top: 10px;
        right: 10px;
    }
} 