/* Product Card Styles */
.product-card {
    background-color: #2c2c2c;
    border: 1px solid #444;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 400px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.product-card__image-container {
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    position: relative;
    background-color: #333;
}

.product-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card__image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #3a3a3a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.product-card__header {
    background-color: #1e1e1e;
    padding: 8px 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: #ccc;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-card__header-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.control-box {
    width: 10px;
    height: 10px;
    border: 1px solid #888;
}

.control-x {
    font-family: sans-serif;
    font-weight: bold;
    color: #888;
    font-size: 1.2em;
    line-height: 1;
}

.product-card__body {
    padding: 16px;
    flex-grow: 1;
}

.product-card__title {
    margin-top: 0;
    font-size: 1.4em;
    color: #FFFFFF; /* VS Code function color */
}

.product-card__description {
    font-size: 1em;
    color: #FFFFFF;
    line-height: 1.6;
}

.product-card__footer {
    padding: 16px;
    border-top: 1px solid #444;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
}

.product-card__price {
    font-size: 1.5em;
    font-weight: bold;
    color: #569cd6; /* VS Code keyword color */
}

.product-card__action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-card__buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.product-card__button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    flex-grow: 1;
}

.product-card__button--info,
.product-card__button--secondary {
    flex-basis: calc(50% - 5px);
}

.buy-now-button {
    flex-basis: 100%;
}

.paypal-button-container {
    flex-basis: 100%;
}

.product-card__button--secondary {
    background-color: var(--accent);
    color: white;
}

.product-card__button--secondary:hover {
    background-color: #a069a1; /* A slightly darker purple for hover */
}

.buy-now-button {
    background-color: var(--accent);
    color: white;
    order: 1;
}

.paypal-button-container {
    order: 2;
}

.buy-now-button:hover {
    background-color: #a069a1; /* A slightly darker purple for hover */
}

/* Cart Modal Styles */
.cart-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.cart-modal-content {
    background-color: #2c2c2c;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    color: #d4d4d4;
}

.close-cart-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-cart-modal:hover,
.close-cart-modal:focus {
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #444;
}

.cart-item:last-child {
    border-bottom: none;
}

.remove-from-cart {
    cursor: pointer;
    color: #ff6b6b;
}

.cart-modal-footer {
    margin-top: 20px;
    text-align: right;
}

/* Product Details Modal */
.product-details-modal {
    display: none;
    position: fixed;
    z-index: 1001; /* Higher than cart modal */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    padding-top: 60px;
}

.product-details-modal-content {
    background-color: #252526;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #3c3c3c;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    color: #d4d4d4;
    position: relative;
}

.close-product-details-modal {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close-product-details-modal:hover,
.close-product-details-modal:focus {
    color: white;
}

#product-details-title {
    color: var(--keyword);
    margin-top: 0;
}

#product-details-description {
    line-height: 1.7;
    margin-bottom: 20px;
    word-wrap: break-word;
}

#product-details-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}

#product-details-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
